Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default function SignUp() {
onChange(data.map(({ id }) => id));
}}
errorMsg={errors.campusIdList?.message}
selectBoxClassName="!h-[50px] !text-base !border-darkGray"
selectBoxClassName="!h-[50px] !text-base"
/>
);
}}
Expand Down
3 changes: 1 addition & 2 deletions src/services/auth/authQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export const getCalendarToken = () =>

// 리프레시 토큰
export const getNewAccessToken = () =>
axiosInstance.get('/login/refresh').catch(error => {
console.log('리프레시 error:', error);
axiosInstance.get('/login/refresh').catch(() => {
window.location.href = `${window.location.origin}/login`;
});

Expand Down
7 changes: 6 additions & 1 deletion src/services/axiosInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ axiosInstance.interceptors.response.use(
case 404:
return redirectToLogin();

case 304:
if (originalRequest.url !== '/api/login/check') {
return handleNewAccessToken();
}
break;

default:
// NOTE: 에러처리
// redirectToLogin();
// alert(
// `예상치 못한 에러가 발생했습니다. (코드: ${error.response.status})`,
Expand Down
Loading