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 getShows(verticalSlug: string) { try { const res = await fetch(`${getApiUrl()}/shows?vertical=${verticalSlug}`, { next: { revalidate: 60 } }) if (!res.ok) return [] return res.json() } catch { return [] } } export default async function ShowsPage({ params }: Props) { const { vertical: verticalSlug } = await params const vertical = VERTICALS.find((v) => v.slug === verticalSlug) if (!vertical) { notFound() } const shows = await getShows(vertical.slug) return (

{vertical.name} Shows

{shows.length === 0 ? (

No shows imported yet for {vertical.name}.

Run the data importer to populate shows.

) : (
{shows.map((show: any) => (
{show.venue?.name || "Unknown Venue"}
{show.venue?.city}, {show.venue?.state || show.venue?.country}
{new Date(show.date).toLocaleDateString()}
{show.tour?.name}
))}
)}
) }