import Link from "next/link"; import { notFound } from "next/navigation"; import { CrosswordConfigForm } from "@/components/crossword-config-form"; import { LanguageSwitcher } from "@/components/language-switcher"; import { getDictionary, isLocale } from "@/lib/i18n"; import { getMockCrosswordResponse } from "@/lib/mock-crossword"; type LocalizedHomePageProps = { params: Promise<{ locale: string }>; }; export default async function LocalizedHomePage({ params }: LocalizedHomePageProps) { const { locale } = await params; if (!isLocale(locale)) { notFound(); } const dict = getDictionary(locale); const crossword = getMockCrosswordResponse(locale); return (
{dict.home.badge}

{dict.home.title}

{dict.home.subtitle}

{dict.home.requestTitle}

{dict.home.requestText}

{dict.home.structureTitle}

{dict.home.structureChips.map((chip) => ( {chip} ))}

{dict.home.structureText}

{dict.home.demoTitle}

{dict.home.kpis.words} {crossword.summary.total_words}
{dict.home.kpis.intersections} {crossword.summary.intersections}
{dict.home.kpis.rows} {crossword.grid.rows}
{dict.home.kpis.cols} {crossword.grid.cols}
{dict.home.openDemo} {dict.home.openConfig}
); }