From 94a6a5d47ee29881bd0cc031a5cc1a15bcc6e930 Mon Sep 17 00:00:00 2001 From: sid <35936587+siddharth-shringarpure@users.noreply.github.com> Date: Sun, 27 Oct 2024 09:40:20 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20time=20being=20displayed?= =?UTF-8?q?=20as=20Unix=20epoch,=20rather=20than=20DDMMYY-like=20time.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/custom/EventDescription.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/custom/EventDescription.tsx b/components/custom/EventDescription.tsx index 03b4497..69157ea 100644 --- a/components/custom/EventDescription.tsx +++ b/components/custom/EventDescription.tsx @@ -33,6 +33,7 @@ const EventDescription: React.FC = ({ }) => { const { toast } = useToast(); const [numTickets, setNumTickets] = useState(1); + const eventDate = new Date(Number(eventDetails.date) * 1000).toLocaleString(); const handleBuyNow = () => { buyHandler(eventDetails.EventID, numTickets, toast); @@ -61,7 +62,7 @@ const EventDescription: React.FC = ({

{eventDetails.description}

Location:
{eventDetails.location}


-

Date:
{eventDetails.date}


+

Date:
{eventDate}


Host:
{eventDetails.host}

{eventDetails.ticketsSold / eventDetails.capacity >= 0.9 && (