import { VERTICALS } from "@/config/verticals" import { notFound } from "next/navigation" import { getApiUrl } from "@/lib/api-config" interface Props { params: { vertical: string } } export function generateStaticParams() { return VERTICALS.map((v) => ({ vertical: v.slug, })) } async function getSongs(verticalSlug: string) { try { const res = await fetch(`${getApiUrl()}/songs?vertical=${verticalSlug}`, { next: { revalidate: 60 } }) if (!res.ok) return [] return res.json() } catch { return [] } } export default async function SongsPage({ params }: Props) { const vertical = VERTICALS.find((v) => v.slug === params.vertical) if (!vertical) { notFound() } const songs = await getSongs(vertical.slug) return (
No songs imported yet for {vertical.name}.
Run the data importer to populate songs.