import { notFound } from "next/navigation" import { VERTICALS } from "@/config/verticals" import { getApiUrl } from "@/lib/api-config" import Link from "next/link" import { Calendar, MapPin, Music, Trophy, Video, Ticket, Building, ChevronRight, Play } from "lucide-react" import { Card, CardContent } from "@/components/ui/card" import { Button } from "@/components/ui/button" interface Props { params: Promise<{ vertical: string }> } export function generateStaticParams() { return VERTICALS.map((v) => ({ vertical: v.slug, })) } async function getRecentShows(verticalSlug: string) { try { const res = await fetch(`${getApiUrl()}/shows?vertical_slugs=${verticalSlug}&limit=8&status=past`, { next: { revalidate: 60 } }) if (!res.ok) return [] return res.json() } catch { return [] } } async function getTopSongs(verticalSlug: string) { try { const res = await fetch(`${getApiUrl()}/songs?vertical_slug=${verticalSlug}&limit=5&sort=times_played`, { next: { revalidate: 60 } }) if (!res.ok) return [] return res.json() } catch { return [] } } export default async function VerticalPage({ params }: Props) { const { vertical: verticalSlug } = await params const vertical = VERTICALS.find((v) => v.slug === verticalSlug) if (!vertical) { notFound() } const [recentShows, topSongs] = await Promise.all([ getRecentShows(verticalSlug), getTopSongs(verticalSlug) ]) const navCards = [ { href: `/${verticalSlug}/shows`, icon: Calendar, title: "Shows", desc: "Browse the complete archive" }, { href: `/${verticalSlug}/venues`, icon: Building, title: "Venues", desc: "Find your favorite spots" }, { href: `/${verticalSlug}/songs`, icon: Music, title: "Songs", desc: "Explore the catalog" }, { href: `/${verticalSlug}/performances`, icon: Trophy, title: "Top Performances", desc: "Highest rated jams" }, { href: `/leaderboards?band=${verticalSlug}`, icon: Trophy, title: "Leaderboards", desc: "Top rated everything" }, { href: `/${verticalSlug}/tours`, icon: Ticket, title: "Tours", desc: "Browse by tour" }, { href: `/videos?band=${verticalSlug}`, icon: Video, title: "Videos", desc: "Watch full shows and songs" }, ] return (
A comprehensive community-driven archive for {vertical.name} history.
Discover shows, share ratings, and explore the music together.
{card.desc}