Skip to content

Commit

Permalink
Fix: 예약 가능 시간대 추가 후 바로 제거가 안되던 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
eunji-0623 committed Aug 7, 2024
1 parent 1b872f6 commit 1073280
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/MyActivity/Register/TimeSlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 1073280

Please sign in to comment.