浏览代码

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);