added collection page

This commit is contained in:
Jelaletdin12
2025-12-15 14:33:34 +05:00
parent 633a3c9d47
commit e886359c5c
31 changed files with 2118 additions and 716 deletions

View File

@@ -13,23 +13,22 @@ const metadataContent = {
} as const;
interface PageProps {
params: {
params: Promise<{
locale: string;
};
}>;
}
export async function generateMetadata(
{ params }: PageProps,
parent: ResolvingMetadata
): Promise<Metadata> {
const locale = params.locale as keyof typeof metadataContent;
const content = metadataContent[locale] || metadataContent.ru;
const { locale } = await params;
const localeKey = locale as keyof typeof metadataContent;
const content = metadataContent[localeKey] || metadataContent.ru;
return {
title: content.title,
description: content.description,
robots: {
index: false,
follow: false,
@@ -39,5 +38,6 @@ export async function generateMetadata(
}
export default async function OrdersPage({ params }: PageProps) {
return <OrdersPageClient locale={params.locale} />;
}
const { locale } = await params;
return <OrdersPageClient locale={locale} />;
}