Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 114ffcd
Author: 전진호 <[email protected]>
Date:   Sun Mar 10 21:48:01 2024 +0900

    fix: refresh token empty case

commit 035ca7b
Author: Jeon Jinho <[email protected]>
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 <[email protected]>
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 <[email protected]>
Date:   Thu Mar 7 22:12:17 2024 +0900

    캐시 무효화(cache busting) (#243)
  • Loading branch information
Jinho1011 committed Mar 10, 2024
1 parent 2c5ff25 commit b4a132f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ const AuthRoute = () => {
await reLogin();
setIsLoading(false);
} catch (e) {
console.error(e);
if (e instanceof Error) {
if (e.message === 'REFRESH_TOKEN_EMPTY') {
setIsLoading(false);
console.error(e);
}
}
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/store/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useAuthStore = create(

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

try {
Expand Down

0 comments on commit b4a132f

Please sign in to comment.