Skip to content

Commit 5e53204

Browse files
committed
refact: bookmark 등록/삭제 실패 시 에러 메세지 추가
1 parent 42d9b50 commit 5e53204

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/features/bookmark/model/useBookmarkHook.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const useCreateBookmark = () => {
2828
onError: (_err, eventId, context) => {
2929
if (context?.previous) {
3030
queryClient.setQueryData(['eventDetail', eventId], context.previous);
31+
alert("좋아요 등록에 실패했습니다. 잠시후 다시 시도해 주세요.");
3132
}
3233
},
3334
onSettled: (_data, _error, eventId) => {
@@ -55,6 +56,7 @@ export const useDeleteBookmark = () => {
5556
onError: (_err, { eventId }, context) => {
5657
if (context?.previous) {
5758
queryClient.setQueryData(['eventDetail', eventId], context.previous);
59+
alert("좋아요 삭제에 실패했습니다. 잠시후 다시 시도해 주세요.");
5860
}
5961
},
6062
onSettled: (_data, _error, { eventId }) => {

0 commit comments

Comments
 (0)