zxsipola123456's picture
Upload 769 files
ab2ded1 verified
raw
history blame contribute delete
287 Bytes
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 <></>;
};