Skip to content

Commit

Permalink
No longer redirects you to dash if login fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Lucas committed Apr 26, 2024
1 parent 0721274 commit aff956b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/index/IndexPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ function IndexPage() {

const handleSignIn = async () => {
await signInWithGoogle();
navigate('/dash', { replace: true }); // Redirect to /dash after signing in
if (auth.currentUser !== null) {
navigate('/dash', { replace: true }); // Redirect to /dash after signing in
}
};

const [userName, setUserName] = useState<string | null>(null);
Expand Down

0 comments on commit aff956b

Please sign in to comment.