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