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 (
No venues imported yet for {vertical.name}.
Run the data importer to populate venues.