From b16ee02a2289dc9c08dcd00c0c5b5490f11a2cd5 Mon Sep 17 00:00:00 2001 From: Josh Heng Date: Sun, 9 Jun 2024 21:15:36 +0100 Subject: [PATCH] :sparkles: Order events on front page --- src/app/(home)/components/whats-on.tsx | 1 + src/app/events/components/event-card.tsx | 8 +++++++- src/app/schedule/components/schedule-event-instance.tsx | 2 +- src/lib/events.ts | 6 +++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/app/(home)/components/whats-on.tsx b/src/app/(home)/components/whats-on.tsx index 5ff2399..74118c4 100644 --- a/src/app/(home)/components/whats-on.tsx +++ b/src/app/(home)/components/whats-on.tsx @@ -26,6 +26,7 @@ export default async function WhatsOn() { .

+

Coming up Next:

{events.map((event) => (
{event.schedule_eventinstance.map((instance) => ( -

+

{' '} diff --git a/src/app/schedule/components/schedule-event-instance.tsx b/src/app/schedule/components/schedule-event-instance.tsx index 3ffd8b2..8ee2a39 100644 --- a/src/app/schedule/components/schedule-event-instance.tsx +++ b/src/app/schedule/components/schedule-event-instance.tsx @@ -18,7 +18,7 @@ export default function ScheduleEventInstance({ return ( 0 ? '' : 'opacity-50 line-through'}`} + className={`block w-52 ${eventPage ? 'hover:scale-105' : 'mr-3'} ${eventInstance.end.getTime() - new Date().getTime() > 0 ? '' : 'opacity-50 line-through'}`} >