import { ArrowUpRight, CalendarDays } from "lucide-react"; import Link from "next/link"; import { MotionFade } from "@/components/motion-fade"; import { PortfolioCover } from "@/components/site/portfolio-cover"; import { getLocalizedPath, type AppLocale } from "@/lib/locale"; import { getLocalizedValue, type PortfolioProjectView } from "@/lib/portfolio"; import { cn } from "@/lib/utils"; type PortfolioProjectGridProps = { locale: AppLocale; defaultLocale: AppLocale; projects: PortfolioProjectView[]; emptyLabel: string; openLabel: string; }; export function PortfolioProjectGrid({ locale, defaultLocale, projects, emptyLabel, openLabel, }: PortfolioProjectGridProps) { if (projects.length === 0) { return ( {emptyLabel} ); } return ( {projects.map((item, index) => { const featured = item.isFeatured; const title = getLocalizedValue(item.title, locale); const category = getLocalizedValue(item.category.name, locale); return ( {category} {item.projectYear} {title} {getLocalizedValue(item.summary, locale)} {openLabel} ); })} ); }
{getLocalizedValue(item.summary, locale)}