update
This commit is contained in:
@ -8,6 +8,8 @@ const RequireAuth = () => {
|
||||
const { auth, loading } = useAuthContext();
|
||||
const location = useLocation();
|
||||
|
||||
// console.log('RequireAuth render: loading =', loading, ' auth =', auth);
|
||||
|
||||
if (loading) {
|
||||
return <ScreenLoader />;
|
||||
}
|
||||
@ -15,4 +17,4 @@ const RequireAuth = () => {
|
||||
return auth ? <Outlet /> : <Navigate to="/auth/login" replace />;
|
||||
};
|
||||
|
||||
export { RequireAuth };
|
||||
export { RequireAuth };
|
||||
Reference in New Issue
Block a user