import type { Metadata } from "next"; import { ArrowRight, BriefcaseBusiness, Boxes, Mail, Sparkles, } from "lucide-react"; import Link from "next/link"; import { getTranslations } from "next-intl/server"; import { Container } from "@/components/layout/container"; import { MotionFade } from "@/components/motion-fade"; import { buildLocalizedMetadata } from "@/lib/metadata"; import { AppCard } from "@/components/ui/app-card"; import { Button } from "@/components/ui/button"; import { CardContent } from "@/components/ui/card"; import { getLocalizedPath, resolveLocale } from "@/lib/locale"; import { pickText, portfolioItems, productItems } from "@/lib/site-data"; type HomePageProps = { params: { locale: string; }; }; export async function generateMetadata({ params: { locale }, }: HomePageProps): Promise { const localeKey = resolveLocale(locale); const t = await getTranslations({ locale: localeKey, namespace: "homepage" }); return buildLocalizedMetadata({ locale: localeKey, pathname: "/", title: t("heroTitle"), description: t("heroText"), }); } export default async function HomePage({ params: { locale } }: HomePageProps) { const localeKey = resolveLocale(locale); const featuredProjects = portfolioItems.slice(0, 3); const featuredProducts = productItems.slice(0, 3); const t = await getTranslations({ locale: localeKey, namespace: "homepage" }); return (

{t("heroKicker")}

{t("heroTitle")}

{t("heroText")}

{t("heroCardTitle")}

{t("heroCardText")}

{t("portfolioTitle")}

{t("portfolioText")}

{featuredProjects.map((item) => (

{pickText(item.category, localeKey)} - {item.year}

{pickText(item.title, localeKey)}

{pickText(item.summary, localeKey)}

{t("toPortfolio")}
))}

{t("productsTitle")}

{t("productsText")}

{featuredProducts.map((item) => (

{pickText(item.segment, localeKey)}

{pickText(item.name, localeKey)}

{pickText(item.summary, localeKey)}

{pickText(item.price, localeKey)}

))}

{t("ctaTitle")}

{t("ctaText")}

); }