import { LabelHeader } from '@/components/LabelHeader' import { LabelStats } from '@/components/LabelStats' import { ArtistRoster } from '@/components/ArtistRoster' interface PageProps { params: Promise<{ id: string }> } async function getLabel(id: string) { const res = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/labels/${id}`, { cache: 'no-store', }) if (!res.ok) throw new Error('Label not found') const data = await res.json() return data.label } async function getLabelStats(id: string) { const res = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/labels/${id}/stats`, { cache: 'no-store', }) if (!res.ok) { return { artistCount: 0, songCount: 0, albumCount: 0, totalPlays: 0 } } const data = await res.json() return data.stats } export default async function LabelPage({ params }: PageProps) { const { id } = await params const [label, stats] = await Promise.all([ getLabel(id), getLabelStats(id), ]) return (
{/* Stats */}
{/* Artist Roster */}

Artists

{ window.location.href = `/artist/${artistId}` }} />
{/* Description */} {label.description && (

About

{label.description}

)}
) }