alpha01 filetti: web app, crossword service and tor batch
This commit is contained in:
34
webapp/app/[locale]/new/page.tsx
Normal file
34
webapp/app/[locale]/new/page.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { CrosswordConfigForm } from "@/components/crossword-config-form";
|
||||
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||
import { getDictionary, isLocale } from "@/lib/i18n";
|
||||
|
||||
type NewCrosswordPageProps = {
|
||||
params: Promise<{ locale: string }>;
|
||||
};
|
||||
|
||||
export default async function NewCrosswordPage({ params }: NewCrosswordPageProps) {
|
||||
const { locale } = await params;
|
||||
if (!isLocale(locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const dict = getDictionary(locale);
|
||||
|
||||
return (
|
||||
<main className="shell stack">
|
||||
<section className="hero">
|
||||
<div className="hero__topline">
|
||||
<span className="hero__badge">{dict.newPage.badge}</span>
|
||||
<LanguageSwitcher locale={locale} path="/new" />
|
||||
</div>
|
||||
<h1 className="page-title">{dict.newPage.title}</h1>
|
||||
<p className="page-subtitle">{dict.newPage.subtitle}</p>
|
||||
</section>
|
||||
|
||||
<section className="card panel">
|
||||
<CrosswordConfigForm locale={locale} dict={dict.form} />
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user