Skip to content

Commit

Permalink
Only move splash events to earlier once a day has passed
Browse files Browse the repository at this point in the history
  • Loading branch information
jotjern committed Jul 22, 2024
1 parent 79c367f commit a0a9e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/calendar/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const buildEvents = (
let futureEvents: Event[];
let pastEvents: Event[];

const nextOrActiveEventIdx = events.findIndex((e) => now < new Date(e.end_time));
const nextOrActiveEventIdx = events.findIndex((e) => now.toISOString().split("T", 1)[0] <= new Date(e.end_time).toISOString().split("T", 1)[0]);
if (nextOrActiveEventIdx !== -1) {
futureEvents = events.slice(nextOrActiveEventIdx);
pastEvents = events.slice(0, nextOrActiveEventIdx);
Expand Down

0 comments on commit a0a9e4f

Please sign in to comment.