ragflow/web/src/wrappers/auth.tsx
balibabu 58e95f76c1
feat: change all file names to lowercase #1574 (#1575)
### 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)
2024-07-17 19:07:34 +08:00

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 <></>;
};