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
2 parents 94a6a5d + 7e91906 commit aa6d31d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env sh
npx lint-staged && npm run build
npm test
24 changes: 23 additions & 1 deletion components/custom/EventDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
variant="outline"
className="text-light-purple bg-blue-100 px-3 py-1 rounded-full"
>
Price: ${eventDetails.ticketPrice.toFixed(2)}
{/*Show price and format by separating triplets of digits*/}
Price: $
{eventDetails.ticketPrice.toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}
</Badge>
</CardHeader>

Expand All @@ -61,6 +66,23 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
<Separator className="my-4" />
<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 />
{eventDate}
</p>
<br />
<p>
<b>Host:</b>
<br />
{eventDetails.host}
</p>
<p><b>Location:</b><br />{eventDetails.location}</p><br />
<p><b>Date:</b><br />{eventDate}</p><br />
<p><b>Host:</b><br />{eventDetails.host}</p>
Expand Down

0 comments on commit aa6d31d

Please sign in to comment.