import { VERTICALS } from "@/config/verticals" import { notFound } from "next/navigation" import { getApiUrl } from "@/lib/api-config" import { Show, PaginatedResponse } from "@/types/models" import { Card } from "@/components/ui/card" import { Calendar, MapPin } from "lucide-react" interface Props { params: Promise<{ vertical: string }> } export function generateStaticParams() { return VERTICALS.map((v) => ({ vertical: v.slug, })) } async function getShows(verticalSlug: string): Promise | null> { try { const res = await fetch(`${getApiUrl()}/shows/?vertical=${verticalSlug}`, { next: { revalidate: 60 } }) if (!res.ok) return null return res.json() } catch { return null } } export default async function ShowsPage({ params }: Props) { const { vertical: verticalSlug } = await params const vertical = VERTICALS.find((v) => v.slug === verticalSlug) if (!vertical) { notFound() } const data = await getShows(vertical.slug) const shows = data?.data || [] return (

{vertical.name} Shows

{shows.length === 0 ? (

No shows imported yet for {vertical.name}.

Run the data importer to populate shows.

) : (
{shows.map((show) => (
{show.venue?.name || "Unknown Venue"}
{show.venue?.city}, {show.venue?.state || show.venue?.country}
{new Date(show.date).toLocaleDateString()}
{show.performances && show.performances.length > 0 && (
{show.performances.length} songs
)}
))}
)}
) }