From f2f0addf96bd7b5b92f57a818b01d3ddfb7f355c Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 13 Aug 2023 02:16:17 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20login=20routing=20=EC=9E=AC?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/account/useAuth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/account/useAuth.ts b/src/hooks/account/useAuth.ts index de75eda..26bba81 100644 --- a/src/hooks/account/useAuth.ts +++ b/src/hooks/account/useAuth.ts @@ -18,7 +18,6 @@ const getAccessToken = async (code: string) => { export const useAuth = () => { const router = useRouter(); - const { user, isLoading } = useUserQuery(); const [isActive, setIsActive] = useState(undefined); const kakaoMutation = useMutation(getAccessToken, { @@ -30,12 +29,13 @@ export const useAuth = () => { } }); + const { user, isLoading } = useUserQuery(); useEffect(() => { if (!kakaoMutation.isLoading && !isLoading && user !== undefined) { setIsActive(useIsActive(user)); isActive ? router.push("/") : router.push("/sign-up/default"); } - }, [kakaoMutation.isLoading, isLoading, user, isActive, router]); + }, [kakaoMutation.isLoading, isActive, router]); return { kakaoMutation From 3ed4139e681cba49eca52d13906857168a53539a Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 13 Aug 2023 02:16:35 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20tsconfig.json=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 6991527..6acd7f5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,12 +21,6 @@ } ] }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - "**/**/*.tsx", - ".next/types/**/*.ts" - ], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] }