From ed9eccf41ef6ccdb7ec7c7f62337d7f915514166 Mon Sep 17 00:00:00 2001 From: AV2 Date: Tue, 12 Nov 2024 10:55:13 +0100 Subject: [PATCH] Feature film screenings (#145) * add film screening to events page filter * fix film screening breaking event type pill, move event type to end of row * add film screening to event type * adjust event row date width so it fits onto one line --- components/eventRow.tsx | 10 +++++----- pages/events/index.tsx | 12 ++++-------- types/shared.d.ts | 3 ++- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/components/eventRow.tsx b/components/eventRow.tsx index 34a2c6e..5c15a64 100644 --- a/components/eventRow.tsx +++ b/components/eventRow.tsx @@ -39,23 +39,23 @@ export default function EventRow({
  • -
    +
    {EventDate(event)}
    {EventDate(event)}
    -
    - -

    {event.title}

    {event.location}

    -
    +
    + +
    +
    diff --git a/pages/events/index.tsx b/pages/events/index.tsx index 3cfeab6..62bbb86 100644 --- a/pages/events/index.tsx +++ b/pages/events/index.tsx @@ -62,20 +62,18 @@ export default function NewsPage({ label: "Concerts", value: "Concert", }, + { + label: "Film screenings", + value: "Film screening", + }, ]; const updateFilter = (value: string, label) => () => { if (value == filter) { - // router.push(`/events`, undefined, { - // shallow: true, - // }); setFilter(""); setTitle("events"); sortEvents(events); } else { - // router.push(`/events?type=${encodeURIComponent(value)}`, undefined, { - // shallow: true, - // }); setFilter(value); setTitle(label.toLowerCase()); sortEvents(filterEvents(value)); @@ -187,8 +185,6 @@ export default function NewsPage({
    - {/*
    {JSON.stringify(upcomingEvents, null, 2)}
    */} - {/*
    {JSON.stringify(pastEvents, null, 2)}
    */} {Object.keys(upcomingEvents).length > 0 ? ( ) : ( diff --git a/types/shared.d.ts b/types/shared.d.ts index cfe698e..6719b12 100644 --- a/types/shared.d.ts +++ b/types/shared.d.ts @@ -296,7 +296,8 @@ export type EventType = | "Hang out" | "Exhibition" | "Festival" - | "Concert"; + | "Concert" + | "Film screening"; export interface EventInterface { title: string; coverImage?: CoverImage;