Skip to content

Commit e8176d3

Browse files
authored
Merge pull request #280 from mlibrary/WEBSITE-117]-Today-and-Upcoming-events-showing-both
Update events-and-exhibits-panel.js
2 parents 2c6d4d4 + d0ec4ae commit e8176d3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/panels/events-and-exhibits-panel.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export default function EventsAndExhibitsPanel () {
9292
// useEffects are only client side, so we can use now here.
9393

9494
// Get upcoming events.
95-
// This is repetative... but :shrug:
9695
const upcomingEvents = events.filter((event) => {
9796
const start = new Date(event.field_event_date_s_[0].value);
9897
const type = event.relationships.field_event_type.name;
@@ -101,7 +100,7 @@ export default function EventsAndExhibitsPanel () {
101100
if (EXHIBIT_TYPES.includes(type)) {
102101
return false;
103102
}
104-
return now < start; // all after today.
103+
return now < new Date(start.toDateString()); // all after today.
105104
});
106105

107106
setUpcomingEvents(upcomingEvents);

0 commit comments

Comments
 (0)