Simplify post-login navigation to avoid being blocked by profile fetch
cgen-ead2d99e015d4fc590cedb48e8b056ad
This commit is contained in:
parent
793b437730
commit
191460bf71
1 changed files with 2 additions and 6 deletions
|
|
@ -62,12 +62,8 @@ export default function Login() {
|
||||||
setIsSignUp(false);
|
setIsSignUp(false);
|
||||||
} else {
|
} else {
|
||||||
await signIn(email, password);
|
await signIn(email, password);
|
||||||
const current = await aethexUserService.getCurrentUser();
|
// Navigate immediately; Dashboard will handle profile/onboarding state
|
||||||
if (current) {
|
navigate("/dashboard", { replace: true });
|
||||||
navigate("/dashboard", { replace: true });
|
|
||||||
} else {
|
|
||||||
navigate("/onboarding", { replace: true });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error("Authentication error:", error);
|
console.error("Authentication error:", error);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue