feat: refactor product components and add sitemap support

- Updated product components to use new IPageParams interface for better type safety.
- Added next-sitemap configuration and generated sitemap.xml and robots.txt files.
- Removed deprecated ProductCard component and its associated types.
- Enhanced internationalization support across various pages.
This commit is contained in:
2025-06-09 11:29:54 +03:30
parent 7073310a22
commit 429256f512
27 changed files with 187 additions and 87 deletions
+2 -8
View File
@@ -2,24 +2,18 @@ import Footer from '@/components/layout/footer/Footer';
import '@/app/globals.css';
import 'leaflet/dist/leaflet.css';
import { notFound } from 'next/navigation';
// import { cookies } from 'next/headers';
import { NextIntlClientProvider } from 'next-intl';
import type { ILayoutLocaleParams } from '@/models/layout.d';
import { cookies } from 'next/headers';
import type { IPageParams } from '@/models/layout.d';
export default async function RootLayout({
children,
params,
}: Readonly<{
children: React.ReactNode;
params: ILayoutLocaleParams;
params: IPageParams;
}>) {
const paramsData = await params;
const locale = paramsData.locale;
// const cookieStore = await cookies();
// // Set locale cookie on the server
// cookieStore.set('locale', locale, { path: '/', httpOnly: false });
const fontClass = locale === 'fa' ? 'font-fa' : 'font-en';