Skip to content

Commit

Permalink
fix: 변경사항 재적용
Browse files Browse the repository at this point in the history
  • Loading branch information
mintmin0320 committed Apr 8, 2024
1 parent 5ec1465 commit 575071d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/app/_hook/common/useHandleApiError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@ export const useHandleApiError = () => {
return (error: ApiError) => {
switch (error.code) {
case ERROR_CODE.INSUFFICIENT_PERMISSION:
renderToast({
type: 'error',
message: ERROR_MESSAGE.PROFILE_COMPLETION_REQUIRED,
})

router.push('/join')

if (window.confirm(ERROR_MESSAGE.PROFILE_COMPLETION_REQUIRED)) {
router.push('/join')
}
break

case ERROR_CODE.INVALID_ACCESS_TOKEN:
renderToast({ type: 'error', message: ERROR_MESSAGE.LOGIN_REQUIRED })

router.push('/login')

if (window.confirm(ERROR_MESSAGE.LOGIN_REQUIRED)) {
router.push('/login')
}
break

default:
Expand Down

0 comments on commit 575071d

Please sign in to comment.