Explorar o código

fix useeffect

AykutSarac %!s(int64=2) %!d(string=hai) anos
pai
achega
852c9fcc3c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);