Skip to content

Commit fe01ac5

Browse files
committed
fix: 401 에러시 바로 로그아웃 처리되지 않는 이슈 수정
1 parent c7d7510 commit fe01ac5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/lib/reactQueryProvider.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { PropsWithChildren, useState } from "react";
44
import axios from "axios";
55
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
66
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
7-
import { useRouter } from "next/navigation";
87

98
import {
109
getLoginInfo,
@@ -94,8 +93,7 @@ apiClient.interceptors.response.use(
9493
processQueue(refreshError, null);
9594
removeLocalStorageAll();
9695
if (typeof window !== "undefined") {
97-
const router = useRouter();
98-
router.push("/login");
96+
window.location.href = "/login";
9997
}
10098
throw refreshError;
10199
} finally {

0 commit comments

Comments
 (0)