Skip to content

Commit cc3055b

Browse files
committed
fix: qa
1 parent 0037b24 commit cc3055b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

apps/ticket/src/lib/axios/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import axios, { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from "axios";
22

33
import { API_URL } from "@/data/constants";
4+
import { PATH } from "@/shared/constants/path";
45
import { IS_LOGINED } from "@/shared/constants/storage";
56
import { AxiosErrorResponse, isAxiosErrorResponse } from "@/shared/types/axioxError";
67

@@ -121,5 +122,10 @@ function redirectToLoginOnce() {
121122

122123
alert("로그인이 필요한 페이지입니다.");
123124
safeLocalStorage.remove(IS_LOGINED);
124-
window.location.href = "/login";
125+
126+
const redirectUrl = window.location.pathname + window.location.search;
127+
128+
const loginUrl = `${PATH.LOGIN}?redirectUrl=${encodeURIComponent(redirectUrl)}`;
129+
130+
window.location.href = loginUrl;
125131
}

0 commit comments

Comments
 (0)