diff --git a/src/pages/index/IndexPage.tsx b/src/pages/index/IndexPage.tsx index 17e3bec..dc61ca0 100644 --- a/src/pages/index/IndexPage.tsx +++ b/src/pages/index/IndexPage.tsx @@ -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(null);