Skip to content

Commit 58499b6

Browse files
committed
🐛 잘못된 북마크 스케줄 필터링 조건문 수정
1 parent a9a2b65 commit 58499b6

File tree

1 file changed

+5
-4
lines changed
  • packages/mobile/src/page/Home/ScheduleContainer

1 file changed

+5
-4
lines changed

packages/mobile/src/page/Home/ScheduleContainer/index.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ export default function ScheduleContainer({ today }: Props) {
1515
data?.filter((schedule) => {
1616
const today = dayjs();
1717

18-
if (today.isSame(schedule.startDateTime, "date")) return true;
19-
if (today.isBefore(schedule.startDateTime, "date")) return false;
20-
if (schedule.endDateTime && today.isAfter(schedule.endDateTime, "date"))
21-
return false;
18+
const { startDateTime, endDateTime } = schedule;
19+
20+
if (endDateTime && today.isAfter(endDateTime, "date")) return false;
21+
if (today.isBefore(startDateTime, "date")) return false;
22+
if (!endDateTime && today.isAfter(startDateTime, "date")) return false;
2223

2324
return true;
2425
}) ?? [];

0 commit comments

Comments
 (0)