import { GenreHeader } from '@/components/GenreHeader' import { SongCard } from '@/components/SongCard' interface PageProps { params: Promise<{ slug: string }> } async function getGenreSongs(slug: string) { const res = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/discover/genres/${slug}`, { cache: 'no-store', }) if (!res.ok) throw new Error('Genre not found') const data = await res.json() return data } export default async function GenrePage({ params }: PageProps) { const { slug } = await params const { genre, songs } = await getGenreSongs(slug) return (
{songs && songs.length > 0 ? (
{songs.map((song: any) => ( ))}
) : (

No songs found in this genre

Check back later for new releases

)}
) }