From 40a9ca91af1881de3251b88aa3454d4988eb708d Mon Sep 17 00:00:00 2001 From: jerry Date: Thu, 19 Dec 2024 00:05:56 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20=EB=94=94=EB=B2=84=EA=B9=85=20?= =?UTF-8?q?=EC=BD=98=EC=86=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/domains/users/queries.ts | 2 +- src/hooks/useTokenRefresher.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apis/domains/users/queries.ts b/src/apis/domains/users/queries.ts index d21ffea9..00b5855b 100644 --- a/src/apis/domains/users/queries.ts +++ b/src/apis/domains/users/queries.ts @@ -18,7 +18,7 @@ export const usePostKakaoLogin = () => { mutationFn: (authCode: string) => postKakaoLogin(authCode), onSuccess: (response) => { if (response) { - // console.log("login success", response); + console.log("login success", response); const userData = response; diff --git a/src/hooks/useTokenRefresher.tsx b/src/hooks/useTokenRefresher.tsx index e432501e..9fa60be8 100644 --- a/src/hooks/useTokenRefresher.tsx +++ b/src/hooks/useTokenRefresher.tsx @@ -15,7 +15,7 @@ export default function TokenRefresher() { localStorage.clear(); openAlert({ title: "다시 로그인 해주세요." }); window.location.reload(); - return null; + return <>; } } @@ -48,6 +48,7 @@ export default function TokenRefresher() { } catch (refreshError) { console.error("Token refresh failed:", refreshError); localStorage.clear(); + navigate("/main"); openAlert({ title: "장시간 미활동으로 인해 \n자동으로 로그아웃 되었습니다." }); window.location.reload(); } @@ -67,5 +68,5 @@ export default function TokenRefresher() { }; }, []); - return null; + return <>; }