Skip to content

Commit

Permalink
Merge branch 'dev' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
jaryapp committed Dec 1, 2023
2 parents d5312c0 + 58499b6 commit a238a45
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/mobile/src/page/Home/ScheduleContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ export default function ScheduleContainer({ today }: Props) {
data?.filter((schedule) => {
const today = dayjs();

if (today.isSame(schedule.startDateTime, "date")) return true;
if (today.isBefore(schedule.startDateTime, "date")) return false;
if (schedule.endDateTime && today.isAfter(schedule.endDateTime, "date"))
return false;
const { startDateTime, endDateTime } = schedule;

if (endDateTime && today.isAfter(endDateTime, "date")) return false;
if (today.isBefore(startDateTime, "date")) return false;
if (!endDateTime && today.isAfter(startDateTime, "date")) return false;

return true;
}) ?? [];
Expand Down

0 comments on commit a238a45

Please sign in to comment.