diff --git a/src/app/student/events/_components/EventDetails.tsx b/src/app/student/events/_components/EventDetails.tsx index c33b4d7..c01f1d7 100644 --- a/src/app/student/events/_components/EventDetails.tsx +++ b/src/app/student/events/_components/EventDetails.tsx @@ -37,6 +37,7 @@ export default function EventDetails({ event: Event className?: string }) { + const today = Date.now() / 1000 return (
{event.name} @@ -68,12 +69,10 @@ export default function EventDetails({ label="Time" value={`${formatTimestampAsTime(event.event_start)} - ${formatTimestampAsTime(event.event_end)}`} icon={}> - {/* Separator */} {(event.food || event.fee) && (
)} - {/* Bottom row */} }> - {event.open_for_signup_student && event.registration_end && (

Registration closes{" "} {formatTimestampAsDate(event.registration_end)}

)} - {/* Signup */} - {event.open_for_signup_student ? ( + {event.open_for_signup_student && + today < (event.registration_end ?? event.event_start) ? ( ) : ( )}