import Link from "next/link"; import type { ProjectType } from "@prisma/client"; import type { Locale } from "@/lib/i18n"; import { getProjectDirectoryCopy, getProjectPath } from "@/lib/project-content"; import { getProjectCategories, getPublishedProjects } from "@/lib/project-queries"; import ProjectCard from "@/components/public/project-card"; type ProjectDirectoryProps = { locale: Locale; type: ProjectType; categorySlug?: string; }; export default async function ProjectDirectory({ locale, type, categorySlug }: ProjectDirectoryProps) { const [projects, categories] = await Promise.all([getPublishedProjects(type, categorySlug), getProjectCategories()]); const copy = getProjectDirectoryCopy(locale, type); const allHref = getProjectPath(locale, type); return (

{copy.eyebrow}

{copy.title}

{copy.description}

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