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);
|
||||
} else {
|
||||
await signIn(email, password);
|
||||
const current = await aethexUserService.getCurrentUser();
|
||||
if (current) {
|
||||
navigate("/dashboard", { replace: true });
|
||||
} else {
|
||||
navigate("/onboarding", { replace: true });
|
||||
}
|
||||
// Navigate immediately; Dashboard will handle profile/onboarding state
|
||||
navigate("/dashboard", { replace: true });
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error("Authentication error:", error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue