ragflow/web/src/wrappers/auth.tsx

12 lines
273 B
TypeScript
Raw Normal View History

2024-01-17 09:37:01 +08:00
import { Navigate, Outlet } from 'umi'
export default (props) => {
// const { isLogin } = useAuth();
console.log(props)
const isLogin = false
if (isLogin) {
return <Outlet />;
} else {
return <Navigate to="/login" />;
}
}