Skip to content

Commit

Permalink
🐛 Fixed time being displayed as Unix epoch, rather than DDMMYY-like t…
Browse files Browse the repository at this point in the history
…ime.
  • Loading branch information
siddharth-shringarpure committed Oct 27, 2024
1 parent 6830708 commit 94a6a5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/custom/EventDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
}) => {
const { toast } = useToast();
const [numTickets, setNumTickets] = useState(1);
const eventDate = new Date(Number(eventDetails.date) * 1000).toLocaleString();

const handleBuyNow = () => {
buyHandler(eventDetails.EventID, numTickets, toast);
Expand Down Expand Up @@ -61,7 +62,7 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
<p className="leading-relaxed">{eventDetails.description}</p>
<Separator className="my-4" />
<p><b>Location:</b><br />{eventDetails.location}</p><br />
<p><b>Date:</b><br />{eventDetails.date}</p><br />
<p><b>Date:</b><br />{eventDate}</p><br />
<p><b>Host:</b><br />{eventDetails.host}</p>
{eventDetails.ticketsSold / eventDetails.capacity >= 0.9 && (
<div className="mt-2 p-2 bg-yellow-300 text-black rounded">
Expand Down

0 comments on commit 94a6a5d

Please sign in to comment.