completionId: cgen-17a053e57a754471a0d06f1e89833463
cgen-17a053e57a754471a0d06f1e89833463
This commit is contained in:
parent
772f229677
commit
098fe02aa5
1 changed files with 4 additions and 4 deletions
|
|
@ -83,13 +83,13 @@ export default function GetStarted() {
|
|||
];
|
||||
|
||||
const navigate = useNavigate();
|
||||
const { user, profileComplete, loading } = useAuth();
|
||||
const { user, profile, loading } = useAuth();
|
||||
|
||||
useEffect(() => {
|
||||
if (loading) return;
|
||||
if (user && profileComplete) navigate("/dashboard", { replace: true });
|
||||
if (user && !profileComplete) navigate("/onboarding", { replace: true });
|
||||
}, [user, profileComplete, loading, navigate]);
|
||||
if (user && profile) navigate("/dashboard", { replace: true });
|
||||
if (user && !profile) navigate("/onboarding", { replace: true });
|
||||
}, [user, profile, loading, navigate]);
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
|
|
|
|||
Loading…
Reference in a new issue