Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions components/Cards/TicketsCard/TicketCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const TicketCard = ({
/>
</div>

<div className="relative h-96">
<div className="relative min-h-[500px] sm:min-h-[550px] pb-8">
{availableTickets.map((ticket, index) => {
const isCurrentCard: boolean = index === currentIndex;
const isPrevCard: boolean =
Expand Down Expand Up @@ -84,8 +84,8 @@ const TicketCard = ({
zIndex,
}}
>
<div className="bg-white shadow-lg rounded-lg overflow-hidden border border-gray-200">
<div className="p-6">
<div className="bg-white shadow-lg rounded-lg overflow-hidden border border-gray-200 h-full flex flex-col">
<div className="p-6 flex flex-col flex-grow min-h-[450px] sm:min-h-[480px]">
<div className="flex justify-between items-start">
<div>
<h3 className="text-xl font-semibold text-gray-900">
Expand All @@ -108,7 +108,7 @@ const TicketCard = ({
<span className="text-gray-500 ml-2">/person</span>
</div>

<ul className="mt-6 space-y-2">
<ul className="mt-6 space-y-2 flex-grow">
{ticket.benefits.map((benefit, i) => (
<li key={i} className="flex items-center text-gray-600">
<TicketIcon className="h-4 w-4 mr-2 text-blue-500" />
Expand All @@ -117,32 +117,34 @@ const TicketCard = ({
))}
</ul>

{ticket.url && !isEnded ? (
<a href={ticket.url} target="_blank" rel="noreferrer">
<div className="mt-auto pt-4">
{ticket.url && !isEnded ? (
<a href={ticket.url} target="_blank" rel="noreferrer">
<Button
type="button"
className="w-full"
text="Get a Free Ticket"
/>
</a>
) : (
<Button
type="button"
className="mt-8 w-full"
text="Get a Free Ticket"
/>
</a>
) : (
<Button
type="button"
disabled={true}
outline={true}
className="mt-8 w-full bg-gray-300"
>
{isEnded ? 'Event Closed' : 'Get a Ticket'}
</Button>
)}
disabled={true}
outline={true}
className="w-full bg-gray-300"
>
{isEnded ? 'Event Closed' : 'Get a Ticket'}
</Button>
)}
</div>
</div>
</div>
</div>
);
})}
</div>

<div className="flex justify-center mt-6 gap-2">
<div className="flex justify-center mt-4 gap-2">
{availableTickets.map((_, index: number) => {
return (
<button
Expand Down
Loading