Updated the useUser hook to work correctly
This commit is contained in:
@@ -12,7 +12,6 @@ export default function useUser({redirectTo = "", redirectIfFound = false} = {})
|
||||
useEffect(() => {
|
||||
// if no redirect needed, just return (example: already on /dashboard)
|
||||
// if user data not yet there (fetch in progress, logged in or not) then don't do anything yet
|
||||
console.log(redirectTo, user);
|
||||
if (!redirectTo || !user) return;
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user