소스 검색

fix useeffect

AykutSarac 2 년 전
부모
커밋
852c9fcc3c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);