mirror of
https://github.com/0xShay/ticketchain.git
synced 2026-01-11 13:13:25 +00:00
✨ Improved displaying of pricing for users.
This commit is contained in:
@@ -1,2 +1 @@
|
|||||||
#!/usr/bin/env sh
|
npm test
|
||||||
npx lint-staged && npm run build
|
|
||||||
|
|||||||
@@ -48,7 +48,12 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
className="text-light-purple bg-blue-100 px-3 py-1 rounded-full"
|
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>
|
</Badge>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
@@ -60,9 +65,23 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
|
|||||||
<Separator className="my-4" />
|
<Separator className="my-4" />
|
||||||
<p className="leading-relaxed">{eventDetails.description}</p>
|
<p className="leading-relaxed">{eventDetails.description}</p>
|
||||||
<Separator className="my-4" />
|
<Separator className="my-4" />
|
||||||
<p><b>Location:</b><br />{eventDetails.location}</p><br />
|
<p>
|
||||||
<p><b>Date:</b><br />{eventDetails.date}</p><br />
|
<b>Location:</b>
|
||||||
<p><b>Host:</b><br />{eventDetails.host}</p>
|
<br />
|
||||||
|
{eventDetails.location}
|
||||||
|
</p>
|
||||||
|
<br />
|
||||||
|
<p>
|
||||||
|
<b>Date:</b>
|
||||||
|
<br />
|
||||||
|
{eventDetails.date}
|
||||||
|
</p>
|
||||||
|
<br />
|
||||||
|
<p>
|
||||||
|
<b>Host:</b>
|
||||||
|
<br />
|
||||||
|
{eventDetails.host}
|
||||||
|
</p>
|
||||||
{eventDetails.ticketsSold / eventDetails.capacity >= 0.9 && (
|
{eventDetails.ticketsSold / eventDetails.capacity >= 0.9 && (
|
||||||
<div className="mt-2 p-2 bg-yellow-300 text-black rounded">
|
<div className="mt-2 p-2 bg-yellow-300 text-black rounded">
|
||||||
Limited Tickets Remaining!
|
Limited Tickets Remaining!
|
||||||
|
|||||||
Reference in New Issue
Block a user