fixed some ui, refactored code

This commit is contained in:
Jelaletdin12
2025-12-13 00:05:43 +05:00
parent 5085c0cffd
commit 633a3c9d47
30 changed files with 1274 additions and 923 deletions

View File

@@ -1,20 +1,43 @@
import type { Metadata } from "next"
import OrdersPageClient from "../../../features/orders/components/OrderPage"
import type { Metadata, ResolvingMetadata } from "next";
import OrdersPageClient from "../../../features/orders/components/OrderPage";
export const metadata: Metadata = {
title: "My Orders | E-Commerce",
description: "View your order history",
robots: "noindex, nofollow", // Private page
}
const metadataContent = {
tm: {
title: "Meniň Sargytlarym | Post shop",
description: "Sargytlaryňyzy görüň",
},
ru: {
title: "Мои Заказы | Пост-магазин",
description: "Просмотр истории заказов",
},
} as const;
interface PageProps {
params: Promise<{
locale: string
}>
params: {
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;
return {
title: content.title,
description: content.description,
robots: {
index: false,
follow: false,
nocache: true,
},
};
}
export default async function OrdersPage({ params }: PageProps) {
const resolvedParams = await params
return <OrdersPageClient locale={resolvedParams.locale} />
return <OrdersPageClient locale={params.locale} />;
}