diff --git a/components/AppsComponent/BrandData/page.jsx b/components/AppsComponent/BrandData/page.jsx index e9ba150..262ef6a 100644 --- a/components/AppsComponent/BrandData/page.jsx +++ b/components/AppsComponent/BrandData/page.jsx @@ -40,13 +40,6 @@ const BrandData = ({ params, data, product }) => {

-
-
-
-
{product?.products?.map((e) => (
@@ -70,6 +63,13 @@ const BrandData = ({ params, data, product }) => {
)}
+ +
+
+
diff --git a/components/Blog/BlogsData/page.jsx b/components/Blog/BlogsData/page.jsx index 9b22ae7..8a5f913 100644 --- a/components/Blog/BlogsData/page.jsx +++ b/components/Blog/BlogsData/page.jsx @@ -180,7 +180,7 @@ const BlogsData = ({ dataCaetgories, data }) => {

- +

کدکس diff --git a/components/LandingPage/HeroSection/page.jsx b/components/LandingPage/HeroSection/page.jsx index bb00d5e..d235f65 100644 --- a/components/LandingPage/HeroSection/page.jsx +++ b/components/LandingPage/HeroSection/page.jsx @@ -62,57 +62,69 @@ const HeroSection = () => { return ( <> -

-
- {slides.map((slide) => ( - +
+

+ Vesmeh Cosmetics Shop +

+
+

+ فروشگاه اینترنتی لوازم آرایشی و بهداشتی وسمه{" "} +

+
+
+
+
+ {slides.map((slide) => ( + +
+ {slide?.title} +
+
+ {slide?.title} +
+ + ))} +
+
+ +
+ {slides.map((e, index) => ( + ))}
- -
- {slides.map((e, index) => ( - - ))} -
); }; diff --git a/src/app/brands/[...id]/page.jsx b/src/app/brands/[...id]/page.jsx index be7a527..a4d5f25 100644 --- a/src/app/brands/[...id]/page.jsx +++ b/src/app/brands/[...id]/page.jsx @@ -32,61 +32,41 @@ async function getProduct(id) { return post; } -// export async function generateMetadata({ params }) { -// const data = await getData(params.id[0]); +export async function generateMetadata({ params }) { + const data = await getData(params.id[0]); -// const decodedName = decodeURIComponent(params.id[1]); -// const imageUrl = new URL( -// data?.product?.files && data?.product?.files[0]?.fileLocation, -// process.env.STORAGE_URL -// ); + console.log("dataaaaa", data); -// const metadataUrl = new URL( -// `products/${params.id[0]}/${data?.product?.persianName}`, -// process.env.NEXT_PUBLIC_APP_URL -// ); -// return { -// title: data?.product?.persianName, -// description: `خرید ${data?.product?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`, -// metadataBase: metadataUrl, -// product_id_meta: data?.product?.id, -// alternates: { -// canonical: metadataUrl, -// }, + const metadataUrl = new URL( + `products/${params.id[0]}/${data?.product?.persianName}`, + process.env.NEXT_PUBLIC_APP_URL + ); + return { + title: !!data?.metaTags.find((e) => e.type == "title") + ? data?.metaTags.find((e) => e.type == "title")?.value + : data?.persianName, + description: !!data?.metaTags.find((e) => e.type == "description") + ? data?.metaTags.find((e) => e.type == "description")?.value + : ` خرید برند ${data?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`, -// keywords: [ -// "آرایشی", -// "بهداشت خانگی", -// "محصولات زیبایی", -// "لوازم تمیزی", -// "مراقبت شخصی", -// ], - -// openGraph: { -// title: data?.product?.persianName, -// description: ` خرید ${data?.product?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`, -// images: [imageUrl], -// url: metadataUrl, -// type: "website", -// locale: "fa-IR", -// type: "website", -// }, -// twitter: { -// site: "@vesmehstore", -// description: ` خرید ${data?.product?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`, -// title: data?.product?.persianName, -// creator: "@vesmehstore", -// }, -// other: { -// product_id: data?.product?.id, -// product_name: data?.product?.persianName, -// product_price: data?.product?.costWithDiscount / 10, -// product_old_price: data?.product?.cost / 10, -// availability: data?.product?.stock > 0 ? "instock" : "outofstock", -// guarantee: "guarantee_sample", -// }, -// }; -// } + openGraph: { + title: !!data?.metaTags.find((e) => e.type == "title") + ? data?.metaTags.find((e) => e.type == "title")?.value + : data?.persianName, + description: !!data?.metaTags.find((e) => e.type == "description") + ? data?.metaTags.find((e) => e.type == "description")?.value + : ` خرید برند ${data?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`, + }, + twitter: { + title: !!data?.metaTags.find((e) => e.type == "title") + ? data?.metaTags.find((e) => e.type == "title")?.value + : data?.persianName, + description: !!data?.metaTags.find((e) => e.type == "description") + ? data?.metaTags.find((e) => e.type == "description")?.value + : ` خرید برند ${data?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`, + }, + }; +} const Page = async ({ params }) => { const data = await getData(params.id[0]); diff --git a/src/app/layout.jsx b/src/app/layout.jsx index 220c310..bd1bfcd 100644 --- a/src/app/layout.jsx +++ b/src/app/layout.jsx @@ -29,13 +29,7 @@ export const metadata = { url: "https://www.vesmeh.com", }, ], - keywords: [ - "آرایشی", - "بهداشت خانگی", - "محصولات زیبایی", - "لوازم تمیزی", - "مراقبت شخصی", - ], + openGraph: { title: "خرید لوازم آرایشی و بهداشتی قیمت مناسب و اصل | فروشگاه اینترنتی وسمه",