Skip to content

Commit

Permalink
chore: 알림 없을 시 예외 처리 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
miin-hyukkk committed Jun 16, 2024
1 parent 833848f commit f8063e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Layout/ScheduleModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ export default function ScheduleModal() {
<DeleteButton
title="알림 전체 삭제"
theme="unfocus"
onClick={() => mutateDeleteAlarm.mutate()}
onClick={() => {
if (data.notifications.length !== 0) mutateDeleteAlarm.mutate();
}}
/>
</Title>
<Modal>
Expand Down

0 comments on commit f8063e8

Please sign in to comment.