Browse Source

fix useeffect

AykutSarac 2 years ago
parent
commit
852c9fcc3c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/pages/sign-in.tsx

+ 1 - 1
src/pages/sign-in.tsx

@@ -37,7 +37,7 @@ const SignIn = () => {
   React.useEffect(() => {
     if (isReady) tokenAuth();
     if (isAuthenticated) replace("/editor");
-  }, [tokenAuth, isReady]);
+  }, [tokenAuth, isReady, isAuthenticated, replace]);
 
   const handleLoginClick = (provider: "github" | "google") => {
     altogic.auth.signInWithProvider(provider);