From a81782401d6a4f36d8abfadbc37cfeaf56fb5d66 Mon Sep 17 00:00:00 2001 From: Erik Thorelli Date: Wed, 16 Sep 2026 12:56:08 -0700 Subject: [PATCH] Delegate public event registration and availability to Luma --- .../2024-10-05-hackathon-at-sentry/page.tsx | 26 +------- .../page.tsx | 33 ++-------- .../2025-04-26-hackathon-at-sentry/page.tsx | 26 +------- .../app/2025-06-02-nextdevfm-live/page.tsx | 26 +------- .../page.tsx | 26 +------- app/src/app/[slug]/page.tsx | 27 +------- app/src/components/event-details.tsx | 61 ++++--------------- 7 files changed, 31 insertions(+), 194 deletions(-) diff --git a/app/src/app/2024-10-05-hackathon-at-sentry/page.tsx b/app/src/app/2024-10-05-hackathon-at-sentry/page.tsx index 5d31a26..9721d40 100644 --- a/app/src/app/2024-10-05-hackathon-at-sentry/page.tsx +++ b/app/src/app/2024-10-05-hackathon-at-sentry/page.tsx @@ -2,7 +2,6 @@ import { notFound } from "next/navigation"; import { Metadata } from "next"; import { getExpandedEventBySlug } from "@/lib/expanded-events"; import { isEventInPast } from "@/lib/events"; -import { getEventAttendeeCount } from "@/lib/attendee-counter"; import { mainConfig } from "@/lib/config"; import { EventDetailsPage, @@ -64,32 +63,13 @@ export default async function HackathonPage() { notFound(); } - // Get real attendee count from Luma API - const attendeeCount = event.lumaEventId - ? await getEventAttendeeCount(event.lumaEventId) - : 0; - const attendeeLimit = event.attendeeLimit; - const isAtCapacity = attendeeCount >= attendeeLimit; const isInPast = isEventInPast(event); const showEventImageSection = !!event.images.length; return ( - - - + + + {showEventImageSection && ( )} diff --git a/app/src/app/2024-12-03-all-things-web-at-convex/page.tsx b/app/src/app/2024-12-03-all-things-web-at-convex/page.tsx index bec8ea0..85e15d8 100644 --- a/app/src/app/2024-12-03-all-things-web-at-convex/page.tsx +++ b/app/src/app/2024-12-03-all-things-web-at-convex/page.tsx @@ -2,7 +2,6 @@ import { notFound } from "next/navigation"; import { Metadata } from "next"; import { getExpandedEventBySlug } from "@/lib/expanded-events"; import { isEventInPast } from "@/lib/events"; -import { getEventAttendeeCount } from "@/lib/attendee-counter"; import { mainConfig } from "@/lib/config"; import { EventDetailsPage, @@ -73,40 +72,16 @@ export default async function ConvexEventPage() { notFound(); } - // Get real attendee count from Luma API - const attendeeCount = event.lumaEventId - ? await getEventAttendeeCount(event.lumaEventId) - : 0; - const attendeeLimit = event.attendeeLimit; - const isAtCapacity = attendeeCount >= attendeeLimit; const isInPast = isEventInPast(event); return ( - - - + + + {HeroAnimation} - + {event.talks.length > 0 && } {event.images.length > 0 && ( = attendeeLimit; const isInPast = isEventInPast(event); const showEventImageSection = !!event.images.length; return ( - - - + + + {showEventImageSection && ( )} diff --git a/app/src/app/2025-06-02-nextdevfm-live/page.tsx b/app/src/app/2025-06-02-nextdevfm-live/page.tsx index de005fb..8f80c0d 100644 --- a/app/src/app/2025-06-02-nextdevfm-live/page.tsx +++ b/app/src/app/2025-06-02-nextdevfm-live/page.tsx @@ -3,7 +3,6 @@ import { Metadata } from "next"; import Link from "next/link"; import { getExpandedEventBySlug } from "@/lib/expanded-events"; import { isEventInPast } from "@/lib/events"; -import { getEventAttendeeCount } from "@/lib/attendee-counter"; import { mainConfig } from "@/lib/config"; import { EventDetailsPage, @@ -80,12 +79,6 @@ export default async function NextDevFmLivePage() { notFound(); } - // Get real attendee count from Luma API - const attendeeCount = event.lumaEventId - ? await getEventAttendeeCount(event.lumaEventId) - : 0; - const attendeeLimit = event.attendeeLimit; - const isAtCapacity = attendeeCount >= attendeeLimit; const isInPast = isEventInPast(event); const showEventImageSection = !!event.images.length; @@ -98,22 +91,9 @@ export default async function NextDevFmLivePage() { const ted = getProfile(tedNymanId); return ( - - - + + + {showEventImageSection && ( )} diff --git a/app/src/app/2025-09-23-lightning-hackathon-at-sentry/page.tsx b/app/src/app/2025-09-23-lightning-hackathon-at-sentry/page.tsx index 581716e..d0abebf 100644 --- a/app/src/app/2025-09-23-lightning-hackathon-at-sentry/page.tsx +++ b/app/src/app/2025-09-23-lightning-hackathon-at-sentry/page.tsx @@ -2,7 +2,6 @@ import { notFound } from "next/navigation"; import { Metadata } from "next"; import { getExpandedEventBySlug } from "@/lib/expanded-events"; import { isEventInPast } from "@/lib/events"; -import { getEventAttendeeCount } from "@/lib/attendee-counter"; import { mainConfig } from "@/lib/config"; import { EventDetailsPage, @@ -65,32 +64,13 @@ export default async function LightningHackathonPage() { notFound(); } - // Get real attendee count from Luma API - const attendeeCount = event.lumaEventId - ? await getEventAttendeeCount(event.lumaEventId) - : 0; - const attendeeLimit = event.attendeeLimit; - const isAtCapacity = attendeeCount >= attendeeLimit; const isInPast = isEventInPast(event); const showEventImageSection = !!event.images.length; return ( - - - + + + {showEventImageSection && ( )} diff --git a/app/src/app/[slug]/page.tsx b/app/src/app/[slug]/page.tsx index 3f6d27d..5201e36 100644 --- a/app/src/app/[slug]/page.tsx +++ b/app/src/app/[slug]/page.tsx @@ -2,7 +2,6 @@ import { notFound } from "next/navigation"; import { Metadata } from "next"; import { getExpandedEventBySlug } from "@/lib/expanded-events"; import { isEventInPast } from "@/lib/events"; -import { getEventAttendeeCount } from "@/lib/attendee-counter"; import { mainConfig } from "@/lib/config"; import { EventDetailsPage, @@ -71,32 +70,12 @@ export default async function EventPage({ params }: PageProps) { notFound(); } - // Get real attendee count from Luma API - const attendeeCount = - event.lumaEventId && event.attendeeLimit > 0 - ? await getEventAttendeeCount(event.lumaEventId) - : 0; - const attendeeLimit = event.attendeeLimit; - const isAtCapacity = attendeeLimit > 0 && attendeeCount >= attendeeLimit; const isInPast = isEventInPast(event); return ( - - - + + + {event.talks.length > 0 && } {event.images.length > 0 && ( - {isInPast - ? "View on Luma" - : isAtCapacity - ? "Join waitlist on Luma" - : "Register on Luma"} + {isInPast ? "View on Luma" : "Register on Luma"} @@ -144,12 +137,10 @@ export function HeroSectionImage({ export function HeroSection({ event, isInPast, - isAtCapacity, children, className, }: { event: ExpandedEvent; - isAtCapacity: boolean; isInPast: boolean; children?: React.ReactNode; className?: string; @@ -163,11 +154,7 @@ export function HeroSection({ ) : ( <>
- +
{isInPast ? "Event has ended" - : attendeeLimit <= 0 + : event.lumaEventUrl ? "Registration on Luma" - : attendeeCount < attendeeLimit - ? "Spots available" - : "At capacity"} + : "Event details"} -

- {attendeeLimit > 0 ? ( - <> - {attendeeCount} / {attendeeLimit} guests registered - - ) : ( - - View event details on Luma + {event.lumaEventUrl && ( +

+ + {isInPast + ? "View event details on Luma" + : "Check availability on Luma"} - )} -

+

+ )}
@@ -573,28 +550,14 @@ export function ImagesSection({ export function EventDetailsPage({ children, event, - isAtCapacity, isInPast, }: { children?: React.ReactNode; event: ExpandedEvent; - isAtCapacity: boolean; isInPast: boolean; }) { return ( - {isAtCapacity && !isInPast && ( -
- - - Registration closed - - This event is fully booked! Join the waitlist to be notified if - any spots open up. We appreciate your interest! - - -
- )} {isInPast && (