fix schema and social and image
parent
029ed1b70f
commit
92dd046adc
|
@ -142,6 +142,8 @@ const ProductData = ({ params, data }) => {
|
|||
className=" mx-auto !object-cover"
|
||||
onClick={() => CTX.setIsOpenLightBox(true)}
|
||||
alt={`${product.persianName} - ${product.englishName}`}
|
||||
property
|
||||
loading="eager"
|
||||
/>
|
||||
) : (
|
||||
<div className="xs:!w-[85px] lg:!w-[85px] my-10 ">
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import logo from "../../public/images/logo.png";
|
||||
import bale from "@img/bale.png";
|
||||
|
||||
const Footer = () => {
|
||||
return (
|
||||
|
@ -35,7 +36,7 @@ const Footer = () => {
|
|||
</div>
|
||||
|
||||
<div className="bg-gray-200">
|
||||
<div className=" xs:px-10 lg:px-20 py-5 ">
|
||||
<div className=" xs:px-5 lg:px-20 xs:py-3 lg:py-5 ">
|
||||
<div className="grid xs:grid-cols-1 lg:grid-cols-2 gap-10 rtl">
|
||||
<div className="grid xs:grid-cols-1 lg:grid-cols-3 gap-10 rtl">
|
||||
<div className="col-span-2">
|
||||
|
@ -52,7 +53,7 @@ const Footer = () => {
|
|||
<Link
|
||||
href={`/categories/bdf6b13c-4be5-4a93-bcdb-612440bdbd6e/کرم مرطوب کننده دست و پا`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
کرم مرطوب کننده دست و پا{" "}
|
||||
</li>
|
||||
</Link>
|
||||
|
@ -60,28 +61,28 @@ const Footer = () => {
|
|||
<Link
|
||||
href={`/categories/20dce1e7-1dfe-4b2a-9764-6f3ddf46fdb2/مرطوب کننده و آبرسان صورت`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
مرطوب کننده و آبرسان صورت{" "}
|
||||
</li>
|
||||
</Link>
|
||||
<Link
|
||||
href={`/categories/16bcdc90-6842-4201-9d5c-54cd8f565148/شوینده سطوح`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
شوینده سطوح
|
||||
</li>
|
||||
</Link>
|
||||
<Link
|
||||
href={`/categories/b7549222-87f7-4b0b-8938-210539b3a395/بهداشت دهان و دندان`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
بهداشت دهان و دندان
|
||||
</li>
|
||||
</Link>
|
||||
<Link
|
||||
href={`/categories/f3e79ed0-d608-470d-8656-7a98ff933c1e/نرم کننده مو`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
نرم کننده مو
|
||||
</li>
|
||||
</Link>
|
||||
|
@ -92,34 +93,34 @@ const Footer = () => {
|
|||
<Link
|
||||
href={`/categories/b909db09-2188-4a4d-8578-e1f7102947bc/کیت رنگ مو`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
کیت رنگ مو{" "}
|
||||
</li>
|
||||
</Link>
|
||||
<Link
|
||||
href={`/categories/effe5d98-d4b7-47e1-9bfb-4d3c77ab3347/بهداشت خانه و آشپرخانه`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
بهداشت خانه و آشپرخانه{" "}
|
||||
</li>
|
||||
</Link>
|
||||
<Link
|
||||
href={`/categories/debf7aad-4f08-4d03-ba70-6663ae1aa90d/سرم مو`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
سرم مو{" "}
|
||||
</li>
|
||||
</Link>
|
||||
<Link
|
||||
href={`/categories/8bf20569-c3e3-457f-b9ad-140ef449741b/ژل بهداشتی بانوان`}
|
||||
>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
ژل بهداشتی بانوان{" "}
|
||||
</li>
|
||||
</Link>
|
||||
|
||||
<Link href={`/blogs?page=0`}>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
مجله زیبایی وسمه{" "}
|
||||
</li>
|
||||
</Link>
|
||||
|
@ -136,20 +137,24 @@ const Footer = () => {
|
|||
<div>
|
||||
<ul>
|
||||
<Link href={`/faq`}>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
سوالات متداول{" "}
|
||||
</li>
|
||||
</Link>
|
||||
<Link href={`/contact-us`}>
|
||||
<li className="text-sm text-gray-600 mt-2">تماس باما </li>
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
تماس باما{" "}
|
||||
</li>
|
||||
</Link>
|
||||
<Link href={`/terms-and-conditions`}>
|
||||
<li className="text-sm text-gray-600 mt-2">
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
قوانین سایت
|
||||
</li>
|
||||
</Link>
|
||||
<Link href={`/about-us`}>
|
||||
<li className="text-sm text-gray-600 mt-2">درباره ما </li>
|
||||
<li className="text-sm text-gray-600 mt-2 xs:py-2 lg:py-0">
|
||||
درباره ما{" "}
|
||||
</li>
|
||||
</Link>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -194,6 +199,7 @@ const Footer = () => {
|
|||
</div>
|
||||
|
||||
<div className="flex xs:justify-center lg:justify-normal rtl xs:mt-5 lg:mt-0">
|
||||
<a href={`https://www.instagram.com/vesmehcom`}>
|
||||
<div className="bg-white p-2 h-fit rounded-2xl mx-1">
|
||||
<svg
|
||||
width="25"
|
||||
|
@ -217,6 +223,9 @@ const Footer = () => {
|
|||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href={`https://t.me/vesmehhcom`}>
|
||||
<div className="bg-white p-2 h-fit rounded-2xl mx-1">
|
||||
<svg
|
||||
width="25"
|
||||
|
@ -241,22 +250,20 @@ const Footer = () => {
|
|||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
<a href={`https://web.bale.ai/flow/search?uid=5560485550`}>
|
||||
<div className="bg-white p-2 h-fit rounded-2xl mx-1">
|
||||
<svg
|
||||
width="25"
|
||||
height="25"
|
||||
viewBox="0 0 226 226"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
<div className="w-[25px]">
|
||||
<Image
|
||||
src={bale}
|
||||
className="opacity-60"
|
||||
>
|
||||
<path
|
||||
d="M200.5 0.5C207.13 0.5 213.489 3.13392 218.178 7.82233C222.866 12.5107 225.5 18.8696 225.5 25.5V200.5C225.5 207.13 222.866 213.489 218.178 218.178C213.489 222.866 207.13 225.5 200.5 225.5H25.5C18.8696 225.5 12.5107 222.866 7.82233 218.178C3.13392 213.489 0.5 207.13 0.5 200.5V25.5C0.5 18.8696 3.13392 12.5107 7.82233 7.82233C12.5107 3.13392 18.8696 0.5 25.5 0.5H200.5ZM194.25 194.25V128C194.25 117.192 189.957 106.828 182.315 99.1854C174.672 91.5433 164.308 87.25 153.5 87.25C142.875 87.25 130.5 93.75 124.5 103.5V89.625H89.625V194.25H124.5V132.625C124.5 123 132.25 115.125 141.875 115.125C146.516 115.125 150.967 116.969 154.249 120.251C157.531 123.533 159.375 127.984 159.375 132.625V194.25H194.25ZM49 70C54.5695 70 59.911 67.7875 63.8492 63.8492C67.7875 59.911 70 54.5695 70 49C70 37.375 60.625 27.875 49 27.875C43.3973 27.875 38.0241 30.1007 34.0624 34.0624C30.1007 38.0241 27.875 43.3973 27.875 49C27.875 60.625 37.375 70 49 70ZM66.375 194.25V89.625H31.75V194.25H66.375Z"
|
||||
fill="black"
|
||||
alt="پیام رسان بله وسمه"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href={`https://twitter.com/vesmehcom`}>
|
||||
<div className="bg-white p-2 h-fit rounded-2xl mx-1">
|
||||
<svg
|
||||
width="25"
|
||||
|
@ -272,6 +279,7 @@ const Footer = () => {
|
|||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import CardNormal from "@comp/Cards/CardNormal/page";
|
||||
import Link from "next/link";
|
||||
import { Swiper, SwiperSlide } from "swiper/react";
|
||||
|
||||
const BeautySection = ({ data }) => {
|
||||
|
@ -61,11 +62,16 @@ const BeautySection = ({ data }) => {
|
|||
))}
|
||||
</Swiper>
|
||||
|
||||
<Link
|
||||
href={"/categories/7e92af7d-0370-451f-9770-5e26b5c8dc63/آرایش-صورت"}
|
||||
className="z-90 relative"
|
||||
>
|
||||
<div className="mx-5 mt-8">
|
||||
<p className="mb-0 text-sm text-gray-600 xs:text-white md:text-black">
|
||||
مشاهده بیشتر{" "}
|
||||
</p>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
|
|
@ -15,7 +15,7 @@ const HeroSection = () => {
|
|||
وسمه ، بُن مضـــــــــــارع زیبایی
|
||||
</h1>
|
||||
<h2 className="text-gray-300 mt-4 xs:text-sm lg:text-lg xl:text-xl font-light ">
|
||||
پلتفرم زیبایی ایرانی راهی برای زیبایی بهتر
|
||||
زیبایی شما در اولویت ماست{" "}
|
||||
</h2>
|
||||
</div>
|
||||
<div className="flex xs:flex-wrap justify-center xs:mt-[50px] lg:mt-[100px] xl:mt-[180px] ">
|
||||
|
@ -28,7 +28,12 @@ const HeroSection = () => {
|
|||
<div className="flex justify-center relative">
|
||||
<div className="absolute w-full">
|
||||
<div className=" xs:w-[110px] lg:w-[170px] lg:ml-[-20px] xs:ml-[-15px] mt-[-10px] ">
|
||||
<Image src={yek} alt="مراقبت پوست فروشگاه اینترنتی وسمه" />
|
||||
<Image
|
||||
src={yek}
|
||||
alt="مراقبت پوست فروشگاه اینترنتی وسمه"
|
||||
property
|
||||
loading="eager"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,7 +53,12 @@ const HeroSection = () => {
|
|||
<div className="flex justify-center relative">
|
||||
<div className="absolute w-full">
|
||||
<div className=" xs:w-[110px] lg:w-[170px] lg:ml-[-20px] xs:ml-[-15px] mt-[-10px] ">
|
||||
<Image src={doo} alt="آرایش لب فروشگاه اینترنتی وسمه" />
|
||||
<Image
|
||||
src={doo}
|
||||
alt="آرایش لب فروشگاه اینترنتی وسمه"
|
||||
property
|
||||
loading="eager"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -68,7 +78,12 @@ const HeroSection = () => {
|
|||
<div className="flex justify-center relative">
|
||||
<div className="absolute w-full">
|
||||
<div className=" xs:w-[110px] lg:w-[170px] lg:ml-[-20px] xs:ml-[-15px] mt-[-10px] ">
|
||||
<Image src={see} alt="آرایش ناخن فروشگاه اینترنتی وسمه" />{" "}
|
||||
<Image
|
||||
src={see}
|
||||
alt="آرایش ناخن فروشگاه اینترنتی وسمه"
|
||||
property
|
||||
loading="eager"
|
||||
/>{" "}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -88,7 +103,12 @@ const HeroSection = () => {
|
|||
<div className="flex justify-center relative">
|
||||
<div className="absolute w-full">
|
||||
<div className=" xs:w-[110px] lg:w-[170px] lg:ml-[-20px] xs:ml-[-15px] mt-[-10px] ">
|
||||
<Image src={chr} alt="بهداشت جنسی فروشگاه اینترنتی وسمه" />
|
||||
<Image
|
||||
src={chr}
|
||||
alt="بهداشت جنسی فروشگاه اینترنتی وسمه"
|
||||
property
|
||||
loading="eager"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -108,7 +128,12 @@ const HeroSection = () => {
|
|||
<div className="flex justify-center relative">
|
||||
<div className="absolute w-full">
|
||||
<div className=" xs:w-[110px] lg:w-[170px] lg:ml-[-20px] xs:ml-[-15px] mt-[-10px] ">
|
||||
<Image src={png} alt="آرایش چشم فروشگاه اینترنتی وسمه" />
|
||||
<Image
|
||||
src={png}
|
||||
alt="آرایش چشم فروشگاه اینترنتی وسمه"
|
||||
property
|
||||
loading="eager"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -128,7 +153,12 @@ const HeroSection = () => {
|
|||
<div className="flex justify-center relative">
|
||||
<div className="absolute w-full">
|
||||
<div className=" xs:w-[110px] lg:w-[170px] lg:ml-[-20px] xs:ml-[-15px] mt-[-10px] ">
|
||||
<Image src={shs} alt="کرم پودر فروشگاه اینترنتی وسمه" />{" "}
|
||||
<Image
|
||||
src={shs}
|
||||
alt="کرم پودر فروشگاه اینترنتی وسمه"
|
||||
property
|
||||
loading="eager"
|
||||
/>{" "}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,7 @@ import Image from "next/image";
|
|||
import { Swiper, SwiperSlide } from "swiper/react";
|
||||
import khane from "../../../public/images/khane.jpg";
|
||||
import CardSurprise from "@comp/Cards/CardSurprise/page";
|
||||
import Link from "next/link";
|
||||
|
||||
const HomeSection = ({ data }) => {
|
||||
return (
|
||||
|
@ -62,6 +63,16 @@ const HomeSection = ({ data }) => {
|
|||
</Swiper>
|
||||
</div>
|
||||
</div>
|
||||
<Link
|
||||
href={"/categories/89631880-a1a3-4759-8fcd-d9284a8f97ed/شوینده-ظروف"}
|
||||
className="z-90 relative"
|
||||
>
|
||||
<div className="mx-5">
|
||||
<p className="mb-0 text-sm text-gray-600 xs:text-white md:text-black">
|
||||
مشاهده بیشتر{" "}
|
||||
</p>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
|
|
@ -66,11 +66,11 @@ const SurpriseSection = ({ data }) => {
|
|||
))}
|
||||
</Swiper>
|
||||
|
||||
<div className="mx-5 mt-8">
|
||||
{/* <div className="mx-5 mt-8">
|
||||
<p className="mb-0 text-sm text-gray-600 xs:text-white md:text-black">
|
||||
مشاهده بیشتر{" "}
|
||||
</p>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
|
|
@ -4,8 +4,6 @@ import PersianNumber from "plugins/PersianNumber";
|
|||
import { useEffect, useState } from "react";
|
||||
|
||||
const TimerDown = () => {
|
||||
const targetTimestamp = 1710654443 * 1000; // Convert to milliseconds
|
||||
|
||||
const [timeRemaining, setTimeRemaining] = useState({
|
||||
days: 0,
|
||||
hours: 0,
|
||||
|
@ -15,34 +13,44 @@ const TimerDown = () => {
|
|||
});
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
const calculateTimeRemaining = () => {
|
||||
// Get current date and time
|
||||
const now = new Date();
|
||||
const timeDifference = targetTimestamp - now.getTime();
|
||||
|
||||
if (timeDifference > 0) {
|
||||
const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
|
||||
// Calculate yesterday's date
|
||||
const yesterday = new Date(now);
|
||||
yesterday.setDate(now.getDate() - 1);
|
||||
yesterday.setHours(23, 59, 0, 0); // Set time to 23:59:00
|
||||
|
||||
// Calculate tomorrow's date
|
||||
const tomorrow = new Date(now);
|
||||
tomorrow.setDate(now.getDate() + 1);
|
||||
tomorrow.setHours(23, 59, 0, 0); // Set time to 23:59:00
|
||||
|
||||
// Calculate time difference
|
||||
const difference = tomorrow - now;
|
||||
|
||||
// Convert time difference to days, hours, minutes, seconds, and milliseconds
|
||||
const days = Math.floor(difference / (1000 * 60 * 60 * 24));
|
||||
const hours = Math.floor(
|
||||
(timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
|
||||
(difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
|
||||
);
|
||||
const minutes = Math.floor(
|
||||
(timeDifference % (1000 * 60 * 60)) / (1000 * 60)
|
||||
);
|
||||
const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
|
||||
const milliseconds = timeDifference % 1000;
|
||||
const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));
|
||||
const seconds = Math.floor((difference % (1000 * 60)) / 1000);
|
||||
const milliseconds = difference % 1000;
|
||||
|
||||
setTimeRemaining({
|
||||
days,
|
||||
hours,
|
||||
minutes,
|
||||
seconds,
|
||||
milliseconds,
|
||||
});
|
||||
} else {
|
||||
clearInterval(interval);
|
||||
}
|
||||
}, 1000);
|
||||
// Update state
|
||||
setTimeRemaining({ days, hours, minutes, seconds, milliseconds });
|
||||
};
|
||||
|
||||
return () => clearInterval(interval);
|
||||
// Call calculateTimeRemaining once to set initial state
|
||||
calculateTimeRemaining();
|
||||
|
||||
// Update time remaining every second
|
||||
const intervalId = setInterval(calculateTimeRemaining, 1000);
|
||||
|
||||
// Clean up interval on component unmount
|
||||
return () => clearInterval(intervalId);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
const nextConfig = {
|
||||
reactStrictMode: false, // React Strict Mode is off
|
||||
images: {
|
||||
minimumCacheTTL: 2592000,
|
||||
domains: ["storage.vesmeh.com"],
|
||||
remotePatterns: [
|
||||
{
|
||||
|
|
|
@ -25,6 +25,8 @@ const GalleryBox = ({ file }) => {
|
|||
className=" mx-auto !object-cover"
|
||||
onClick={() => CTX.setIsOpenLightBox(true)}
|
||||
alt={file[0].fileName}
|
||||
priority
|
||||
loading="eager"
|
||||
/>
|
||||
) : (
|
||||
<div className="xs:!w-[85px] lg:!w-[85px] ">
|
||||
|
@ -51,6 +53,8 @@ const GalleryBox = ({ file }) => {
|
|||
alt={e.fileName}
|
||||
width={50}
|
||||
height={50}
|
||||
priority
|
||||
loading="eager"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
|
@ -10,6 +10,28 @@ async function getData(id) {
|
|||
const page = async ({ params }) => {
|
||||
const data = await getData(params.id[0]);
|
||||
|
||||
console.log(data);
|
||||
|
||||
// const structuredData = {
|
||||
// "@context": "https://schema.org",
|
||||
// "@type": "BlogPosting",
|
||||
// headline: "This is a cool blog post",
|
||||
// image: ["small.webp", "large.webp"],
|
||||
// datePublished: "2024-02-15T00:00:00",
|
||||
// dateModified: "2025-02-15T00:00:00",
|
||||
// author: [
|
||||
// {
|
||||
// "@type": "Person",
|
||||
// name: "Firstname LastName",
|
||||
// jobTitle: "Blog post writer",
|
||||
// worksFor: "Blog post company",
|
||||
// url: `${process.env.NEXT_PUBLIC_SITE_URL}/people/firstname-lastname`,
|
||||
// image: `${process.env.NEXT_PUBLIC_SITE_URL}/people/f_lastname.webp`,
|
||||
// },
|
||||
// ],
|
||||
// description: "There are things in this post. Don't be vague like me",
|
||||
// };
|
||||
|
||||
return <BlogData data={data} />;
|
||||
};
|
||||
|
||||
|
|
|
@ -58,26 +58,25 @@ export const metadata = {
|
|||
other: { enamad: "735422" },
|
||||
};
|
||||
|
||||
// const structuredData = {
|
||||
// "@context": "https://schema.org",
|
||||
// "@type": "Organization",
|
||||
// url: process.env.NEXT_PUBLIC_APP_URL,
|
||||
// logo: "",
|
||||
// name: "فروشگاه اینترنتی وسمه",
|
||||
// legalName: "وسمه",
|
||||
// telephone: "+982188196154",
|
||||
// sameAs: ["https://t.me/vesmehhcom"],
|
||||
// };
|
||||
const structuredData = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
url: process.env.NEXT_PUBLIC_APP_URL,
|
||||
logo: "https://storage.vesmeh.com/Logo/Med/Main.png",
|
||||
name: "فروشگاه اینترنتی وسمه",
|
||||
legalName: "وسمه",
|
||||
telephone: "+982188196154",
|
||||
sameAs: [
|
||||
"https://t.me/vesmehhcom",
|
||||
"https://twitter.com/vesmehcom",
|
||||
"https://www.instagram.com/vesmehcom",
|
||||
],
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }) {
|
||||
// if (process.env.NEXT_PUBLIC_IS_DEV === "false") {
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
return (
|
||||
<html lang="en">
|
||||
{/* <head>
|
||||
<head>
|
||||
<script
|
||||
key="structured-data"
|
||||
type="application/ld+json"
|
||||
|
@ -85,7 +84,7 @@ export default function RootLayout({ children }) {
|
|||
__html: JSON.stringify(structuredData),
|
||||
}}
|
||||
/>
|
||||
</head> */}
|
||||
</head>
|
||||
<body>
|
||||
<RootData>{children}</RootData>
|
||||
</body>
|
||||
|
|
|
@ -20,7 +20,7 @@ export async function generateMetadata({ params }) {
|
|||
process.env.NEXT_PUBLIC_APP_URL
|
||||
);
|
||||
return {
|
||||
title: decodedName,
|
||||
title: data?.product?.persianName,
|
||||
description: `خرید ${data?.product?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`,
|
||||
metadataBase: metadataUrl,
|
||||
product_id_meta: data?.product?.id,
|
||||
|
@ -60,10 +60,29 @@ export async function generateMetadata({ params }) {
|
|||
|
||||
const Page = async ({ params }) => {
|
||||
const data = await getData(params.id[0]);
|
||||
const imageUrl = new URL(
|
||||
data?.product?.files && data?.product?.files[0]?.fileLocation,
|
||||
process.env.STORAGE_URL
|
||||
);
|
||||
|
||||
const structuredData = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Product",
|
||||
name: data?.product?.persianName,
|
||||
image: imageUrl,
|
||||
description: ` خرید ${data?.product?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`,
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<ProductData params={params} data={data} />
|
||||
<script
|
||||
key="structured-data"
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify(structuredData),
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue