Skip to content

Commit

Permalink
Feat: 로그인 실패시, 토스트에러 메세지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkSohyunee committed Feb 16, 2024
1 parent e11cc94 commit 7d319b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/account/_components/LogoutModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function LogoutModal({ handleSetOff }: LogOutModalProps) {
}
} catch (error) {
if (error instanceof AxiosError) {
console.error(error.message);
toasting({ type: 'error', txt: toastMessage.ko.loggedOutError });
}
}
};
Expand Down
2 changes: 2 additions & 0 deletions src/lib/constants/toastMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const toastMessage = {
ko: {
requiredLogin: '로그인이 필요해요.',
loggedOut: '로그아웃 되었어요.',
loggedOutError: '로그아웃에 실패했어요. 다시 시도해주세요.🥲',
limitFollow: `최대 ${MAX_FOLLOWING.toLocaleString('ko-KR')}명까지 팔로우할 수 있어요.`,
uploadImageError: '이미지를 업로드에 실패했어요. 다시 업로드해주세요.🥲',
createListError: '리스트 생성에 실패했어요. 다시 시도해주세요.🥲',
Expand All @@ -14,6 +15,7 @@ const toastMessage = {
en: {
requiredLogin: 'Login is required.',
loggedOut: 'Logged out successfully.',
loggedOutError: 'Failed to log out. Please try again.🥲',
limitFollow: `Following exceeds the limit of ${MAX_FOLLOWING.toLocaleString('en-US')}.`,
uploadImageError: 'Failed to upload the image. Please try again.🥲',
createListError: 'Failed to create the list. Please try again.🥲',
Expand Down

0 comments on commit 7d319b8

Please sign in to comment.