import { VERTICALS } from "@/config/verticals" import { notFound } from "next/navigation" import { getApiUrl } from "@/lib/api-config" interface Props { params: Promise<{ vertical: string }> } export function generateStaticParams() { return VERTICALS.map((v) => ({ vertical: v.slug, })) } async function getVenues(verticalSlug: string) { try { const res = await fetch(`${getApiUrl()}/venues?vertical=${verticalSlug}`, { next: { revalidate: 60 } }) if (!res.ok) return [] const data = await res.json() return data.data || [] } catch { return [] } } export default async function VenuesPage({ params }: Props) { const { vertical: verticalSlug } = await params const vertical = VERTICALS.find((v) => v.slug === verticalSlug) if (!vertical) { notFound() } const venues = await getVenues(vertical.slug) return (

{vertical.name} Venues

{venues.length === 0 ? (

No venues imported yet for {vertical.name}.

Run the data importer to populate venues.

) : (
{venues.map((venue: any) => (
{venue.name}
{venue.city}, {venue.state || venue.country}
{venue.capacity && (
Capacity: {venue.capacity.toLocaleString()}
)}
))}
)}
) }