Force routing to onboarding after sign-in and OAuth
cgen-340a88b341a541ada5c84609bbd76330
This commit is contained in:
parent
d9c749a328
commit
e8b5b119d9
1 changed files with 3 additions and 7 deletions
|
|
@ -39,13 +39,9 @@ export default function Login() {
|
|||
// Redirect if already logged in
|
||||
useEffect(() => {
|
||||
if (user && !loading) {
|
||||
if (profile) {
|
||||
navigate("/dashboard", { replace: true });
|
||||
} else {
|
||||
navigate("/onboarding", { replace: true });
|
||||
}
|
||||
navigate("/onboarding", { replace: true });
|
||||
}
|
||||
}, [user, profile, loading, navigate]);
|
||||
}, [user, loading, navigate]);
|
||||
|
||||
const handleSubmit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
|
|
@ -279,7 +275,7 @@ export default function Login() {
|
|||
}
|
||||
>
|
||||
<LogIn className="h-4 w-4 mr-2" />
|
||||
{isSignUp ? "Create Account" : "Sign In to Dashboard"}
|
||||
{isSignUp ? "Create Account" : "Sign In"}
|
||||
<ArrowRight className="h-4 w-4 ml-2" />
|
||||
</Button>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in a new issue