diff --git a/src/components/dashboard/EventsSection.astro b/src/components/dashboard/EventsSection.astro index 4f9d274..ae75ade 100644 --- a/src/components/dashboard/EventsSection.astro +++ b/src/components/dashboard/EventsSection.astro @@ -720,6 +720,8 @@ import FilePreview from "./Officer_EventManagement/FilePreview"; const renderEventCard = (event: Event, container: HTMLElement) => { const startDate = new Date(event.start_date); const endDate = new Date(event.end_date); + const now = new Date(); + const isPastEvent = endDate < now; // Store event data in window object with unique ID const eventDataId = `event_${event.id}`; @@ -771,7 +773,9 @@ import FilePreview from "./Officer_EventManagement/FilePreview"; ${event.location} ${ - event.files && event.files.length > 0 + isPastEvent && + event.files && + event.files.length > 0 ? `