Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ticket section render issue #445

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 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
11 changes: 7 additions & 4 deletions components/Tickets/ticketCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ function TicketCards({ className, city }) {
const buttonText = city.isFree ? 'Get Your Ticket' : 'Buy Now';

return (
<div className={`w-[300px] lg:w-full ${cardOpacity} hoverEffect h-[400px] cursor-pointer flex flex-col text-white justify-between rounded-lg card bg-white ${className}`}>
<div className='p-4'>
<div className='text-xl font-bold text-gradient'>{city.name}, {city.country}</div>
<div className='mt-2 text-lg'>{city.date}</div>
<div className={`w-[300px] lg:w-full ${cardOpacity} hoverEffect h-[400px] cursor-pointer flex flex-col text-white justify-between rounded-lg card bg-white lg:m-0 m-4 ${className}`}>
<div className="p-4 h-[100%] bg-cover relative">
<div className='text-xl font-bold text-gradient'>{city.name}, {city.country}
</div>
<div className='mt-2 text-lg mb-2'>{city.date}</div>
<p className='border-t pt-2'>{city.description}</p>
</div>

<div className='flex justify-center border-t h-20 border-dashed p-4 text-center'>
{/* Show a button based on the event status */}
{isEndedOrUpcoming ? (
Expand Down
9 changes: 5 additions & 4 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ export default function Home() {
Experience the Future of Asynchronous Communication: Get Tickets for the AsyncAPI Conference on Tour!
</Paragraph>
</div>
<div className='w-[1000px] lg:w-full mt-10 flex justify-between lg:flex-col'>
{cities.map((city) => {
if(city.ended === false){
<div className='w-[1000px] lg:w-full mt-10 flex justify-center lg:flex-col flex-wrap'>
{cities.filter((x)=>x.ended == false).map((city) => {
return <TicketCards key={city.name} city={city} className='lg:mt-10' />
})}
{cities.filter((x)=>x.ended == true).map((city) => {
return <TicketCards key={city.name} city={city} className='lg:mt-10' />
}
})}
</div>
</div>
Expand Down
Loading