Simplify post-login navigation to avoid being blocked by profile fetch

cgen-ead2d99e015d4fc590cedb48e8b056ad
This commit is contained in:
Builder.io 2025-09-27 20:57:27 +00:00
parent 793b437730
commit 191460bf71

View file

@ -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);