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 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"] }