import Link from "next/link"; import type { Locale } from "@/lib/i18n"; import { getMelodyDirectoryCopy, getMelodyPath } from "@/lib/melody-content"; import { getMelodyCategories, getPublishedMelodies } from "@/lib/melody-queries"; import MelodyCard from "@/components/public/melody-card"; export default async function MelodyDirectory({ locale, categorySlug }: { locale: Locale; categorySlug?: string }) { const [melodies, categories] = await Promise.all([getPublishedMelodies(categorySlug), getMelodyCategories()]); const copy = getMelodyDirectoryCopy(locale); const allHref = getMelodyPath(locale); return (

{copy.eyebrow}

{copy.title}

{copy.description}

{categories.length > 0 ? : null} {melodies.length === 0 ?
{copy.empty}
:
{melodies.map((melody) => )}
}
); }