diff --git a/src/app/student/_components/EventItem.tsx b/src/app/student/_components/EventItem.tsx index 750d15a..adbcfd8 100644 --- a/src/app/student/_components/EventItem.tsx +++ b/src/app/student/_components/EventItem.tsx @@ -1,23 +1,32 @@ -import { P } from "@/app/_components/Paragraph" -import { - AccordionContent, - AccordionItem, - AccordionTrigger -} from "@/components/ui/accordion" +import { AccordionItem, AccordionTrigger } from "@/components/ui/accordion" import { cn } from "@/lib/utils" +import { DateTime } from "luxon" export function EventItem({ children, - title, - dateString + EventTitle, + open_for_signup, + registration_required, + location, + event_start, + registration_end, + image_url }: { children?: React.ReactNode - title: string - dateString: string + EventTitle: string + open_for_signup: boolean + registration_required: boolean + location: string + event_start: number + registration_end: number + image_url: string }) { const expandable = children != null return ( - +
-

{dateString}

-
-

{title}

+
+

{EventTitle}

+
+
{location}
+
+ Event Start: + {DateTime.fromMillis(event_start * 1000).toFormat("yyyy MMM dd")} +
+
+
+ {open_for_signup ? ( +
Open for signup
+ ) : ( +
Close for signup
+ )} +
+ {registration_required ? ( +
Registration required
+ ) : ( +
+ )} +
+ Registration Due: + {DateTime.fromMillis(registration_end * 1000).toFormat( + "yyyy MMM dd" + )}
- - {children} - ) }