Skip to content

Commit b4a132f

Browse files
committedMar 10, 2024·
Squashed commit of the following:
commit 114ffcd Author: 전진호 <gino9940@gmail.com> Date: Sun Mar 10 21:48:01 2024 +0900 fix: refresh token empty case commit 035ca7b Author: Jeon Jinho <gino9940@gmail.com> Date: Sun Mar 10 14:43:31 2024 +0900 알림 기능 구현 (#245) * feat: add getNotification api * feat: add useUnreadNotifications * feat: add dot to unread item * feat: add read notification commit 8fdd711 Author: Jeon Jinho <gino9940@gmail.com> Date: Sun Mar 10 14:43:16 2024 +0900 feat: add topic card action sheet (#244) * feat: add topic card action sheet * feat: disable 투표 다시하기 commit c9a80ca Author: Jeon Jinho <gino9940@gmail.com> Date: Thu Mar 7 22:12:17 2024 +0900 캐시 무효화(cache busting) (#243)
1 parent 2c5ff25 commit b4a132f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
 

‎src/routes/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ const AuthRoute = () => {
3636
await reLogin();
3737
setIsLoading(false);
3838
} catch (e) {
39-
console.error(e);
39+
if (e instanceof Error) {
40+
if (e.message === 'REFRESH_TOKEN_EMPTY') {
41+
setIsLoading(false);
42+
console.error(e);
43+
}
44+
}
4045
}
4146
};
4247

‎src/store/auth.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const useAuthStore = create(
3131

3232
if (!refreshToken) {
3333
set({ isLoggedIn: false });
34-
throw new Error('저장되어 있는 refreshToken이 없습니다.');
34+
throw new Error('REFRESH_TOKEN_EMPTY');
3535
}
3636

3737
try {

0 commit comments

Comments
 (0)
Please sign in to comment.