Skip to content

Commit 17c8741

Browse files
hackathon end_date (supabase#30976)
* hackathon end_date * end_date
1 parent b43cfa8 commit 17c8741

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apps/www/_events/2024-12-05-launch-week-13-hackathon.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ meta_description: 'Build an Open Source Project over 10 days. 5 prize categories
66
type: 'hackathon'
77
onDemand: false
88
date: '2024-12-06T09:00:00.000-07:00'
9+
end_date: '2024-12-16T00:00:00.000-07:00'
910
timezone: 'America/Los_Angeles'
1011
duration: '10 days'
1112
categories:

apps/www/pages/events/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ export async function getStaticProps() {
155155
}) as BlogPost[]
156156

157157
const allEvents = [...staticEvents, ...meetupEvents]
158-
const upcomingEvents = allEvents.filter((event: BlogPost) => new Date(event.date!) >= new Date())
158+
const upcomingEvents = allEvents.filter((event: BlogPost) =>
159+
event.end_date ? new Date(event.end_date!) >= new Date() : new Date(event.date!) >= new Date()
160+
)
159161
const onDemandEvents = allEvents.filter(
160162
(event: BlogPost) => new Date(event.date!) < new Date() && event.onDemand === true
161163
)

0 commit comments

Comments
 (0)