mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-01 05:32:01 +08:00

### What problem does this PR solve? feat: change all file names to lowercase #1574 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
14 lines
287 B
TypeScript
14 lines
287 B
TypeScript
import { useAuth } from '@/hooks/auth-hooks';
|
|
import { Navigate, Outlet } from 'umi';
|
|
|
|
export default () => {
|
|
const { isLogin } = useAuth();
|
|
if (isLogin === true) {
|
|
return <Outlet />;
|
|
} else if (isLogin === false) {
|
|
return <Navigate to="/login" />;
|
|
}
|
|
|
|
return <></>;
|
|
};
|