Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
23 lines
1.0 KiB
TypeScript
23 lines
1.0 KiB
TypeScript
import { isLocale, LOCALES } from '@barev/i18n';
|
|
import { notFound } from 'next/navigation';
|
|
import { LegalDocument, legalMetadata } from '../../../components/legal';
|
|
|
|
export const dynamicParams = false;
|
|
export function generateStaticParams() {
|
|
return LOCALES.map((locale) => ({ locale }));
|
|
}
|
|
|
|
/** Разделы по порядку; тексты — refund.<id>.title / refund.<id>.body */
|
|
const SECTIONS = ['cancelClient', 'cancelUs', 'quality', 'subscription', 'nonRefundable', 'howTo', 'timing'] as const;
|
|
|
|
export function generateMetadata({ params }: { params: Promise<{ locale: string }> }) {
|
|
return legalMetadata(params, 'refund');
|
|
}
|
|
|
|
/** Правила отмены и возврата денег. Основной текст на русском, переводы needs_review */
|
|
export default async function Page({ params }: { params: Promise<{ locale: string }> }) {
|
|
const { locale } = await params;
|
|
if (!isLocale(locale)) notFound();
|
|
return <LegalDocument locale={locale} ns="refund" sections={SECTIONS} />;
|
|
}
|