mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-09-21 22:23:36 +00:00
14 lines
298 B
TypeScript
14 lines
298 B
TypeScript
import { useAuth } from '@/hooks/authHook';
|
|
import { Navigate, Outlet } from 'umi';
|
|
|
|
export default () => {
|
|
const { isLogin } = useAuth();
|
|
if (isLogin === true) {
|
|
return <Outlet />;
|
|
} else if (isLogin === false) {
|
|
return <Navigate to="/login" />;
|
|
}
|
|
|
|
return <></>;
|
|
};
|