canina/frontend/application/app/shop/page.tsx
parsa aghaei 8d1b786a24
All checks were successful
Deploy Canina / deploy (push) Successful in 1m50s
chore(brand): rename all Persian occurrences of کانینا to کنینا across the project
2026-08-16 16:40:08 +03:30

40 lines
2.0 KiB
TypeScript

import type { Metadata } from "next";
import ArchivePage from "../../components/ArchivePage";
export const metadata: Metadata = {
title: "فروشگاه تخصصی مکمل‌های دارویی - کنینا ایران",
description: "خرید آنلاین انواع مکمل‌های درمانی، مفاصل و استخوان، گوارش و ایمنی، ویتامین‌ها و مراقبت‌های ویژه سگ و گربه با تضمین اصالت و گواهی سلامت دامپزشکی.",
alternates: {
canonical: "/shop",
},
openGraph: {
title: "فروشگاه تخصصی مکمل‌های دارویی - کنینا ایران",
description: "خرید آنلاین انواع مکمل‌های درمانی، مفاصل و استخوان، گوارش و ایمنی، ویتامین‌ها و مراقبت‌های ویژه سگ و گربه.",
url: "https://canina-iran.com/shop",
siteName: "کنینا ایران",
locale: "fa_IR",
type: "website",
}
};
export default async function Shop({ searchParams }: { searchParams: Promise<{ [key: string]: string | string[] | undefined }> }) {
const resolvedParams = await searchParams;
const category = typeof resolvedParams.category === 'string' ? resolvedParams.category : "all";
const search = typeof resolvedParams.search === 'string' ? resolvedParams.search : "";
const petType = typeof resolvedParams.petType === 'string' ? resolvedParams.petType : "all";
// Support both ?symptoms= (multi, from sidebar URL state) and ?symptom= (single, from megamenu/PDP links)
const symptomsParam = typeof resolvedParams.symptoms === 'string' ? resolvedParams.symptoms : "";
const symptomSingle = typeof resolvedParams.symptom === 'string' ? resolvedParams.symptom : "";
const symptoms = symptomsParam || (symptomSingle ? symptomSingle : "");
return (
<ArchivePage
initialCategory={category}
initialSearch={search}
initialPetType={petType}
initialSymptoms={symptoms}
/>
);
}