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