From 107328080765ff6acad667c21bc535b24133d6e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=80=EC=A7=80?= <103625348+eunji-0623@users.noreply.github.com> Date: Wed, 7 Aug 2024 12:22:05 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=98=88=EC=95=BD=20=EA=B0=80=EB=8A=A5?= =?UTF-8?q?=20=EC=8B=9C=EA=B0=84=EB=8C=80=20=EC=B6=94=EA=B0=80=20=ED=9B=84?= =?UTF-8?q?=20=EB=B0=94=EB=A1=9C=20=EC=A0=9C=EA=B1=B0=EA=B0=80=20=EC=95=88?= =?UTF-8?q?=EB=90=98=EB=8D=98=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/MyActivity/Register/TimeSlot.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/MyActivity/Register/TimeSlot.tsx b/components/MyActivity/Register/TimeSlot.tsx index 36f3d28..f1eabaa 100644 --- a/components/MyActivity/Register/TimeSlot.tsx +++ b/components/MyActivity/Register/TimeSlot.tsx @@ -179,6 +179,14 @@ function TimeSlot({ isEdit }: TimeSlotProps) { setEditSchedule((prevSchedule) => ({ ...prevSchedule, idsToRemove: [...prevSchedule.idsToRemove, id], + toAdd: prevSchedule.toAdd.filter( + (schedule) => + !( + schedule.date === scheduleToRemove.date && + schedule.startTime === scheduleToRemove.startTime && + schedule.endTime === scheduleToRemove.endTime + ) + ), })); } else { console.log('No matching time slot found');