From 8b9bf20fcc4d1412f7a0cc98f845234e950229ab Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Thu, 2 Nov 2023 00:30:27 -0500 Subject: [PATCH] add more info to event page (#100) --- src/pages/membership/Event.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pages/membership/Event.tsx b/src/pages/membership/Event.tsx index 7ea6e1d..7be4670 100644 --- a/src/pages/membership/Event.tsx +++ b/src/pages/membership/Event.tsx @@ -150,6 +150,8 @@ const Event = () => { if (Object.keys(paidEventList).length === 0) { return ; } else { + const dateString = new Date(paidEventList['event_time'] * 1000) + const isRunningOut = (paidEventList['tickets_sold']/paidEventList['event_capacity'] > 0.75) return ( @@ -165,8 +167,19 @@ const Event = () => { { paidEventList["eventDetails"]} - Cost: ${paidEventList["eventCost"]["paid"]} for paid ACM members, ${paidEventList["eventCost"]["others"]} for all other participants. + Date: {dateString.toLocaleString([], { + 'year': 'numeric', + 'month': 'long', + 'day': 'numeric', + 'hour12': true, + 'hour': 'numeric', + "timeZoneName": "short" + })}. + + Cost: ${paidEventList["eventCost"]["paid"]} for paid ACM@UIUC members, ${paidEventList["eventCost"]["others"]} for all other participants. + + {isRunningOut ? <>Tickets are running out, order soon! : null}