fix small bugs

master
حسین معصومی پور 2024-04-29 00:10:33 +03:30
parent 7fc2093e91
commit 6c0acb869d
9 changed files with 258 additions and 148 deletions

View File

@ -129,59 +129,86 @@ const CheckoutData = () => {
<div className="xs:w-full lg:w-4/12 mx-auto">
<div className="text-right flex rtl justify-between border-y-[1px] border-gray-100 mt-3 px-4 ">
<p className="mb-0 !text-sm font-medium py-4">آدس ها</p>
<p className="mb-0 !text-sm font-medium py-4">آدرس ها</p>
<div
{/* <div
className="bg-primary-200 w-fit h-fit relative my-3 p-1 rounded-lg"
onClick={() => CTX.setBottomSheetAddressOpen(true)}
>
<p className="mb-0 text-[11px] text-white rtl">
افزودن آدرس جدید
</p>
</div>
</div> */}
</div>
{addressData.map((e, index) => (
<div
className={`flex rtl px-3 py-4 border-2 border-transparent tr03 mx-2 mt-3 cursor-pointer ${
addressId == index
? "border-2 !border-green-600 rounded-lg bg-green-50"
: ""
}`}
onClick={() => setAddressId(index)}
key={index}
>
<div>
<svg
width="20"
height="20"
viewBox="0 0 188 264"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-70 mx-auto "
{addressData?.length > 0 ? (
<>
{addressData.map((e, index) => (
<div
onClick={() => setAddressId(index)}
className={`flex rtl justify-between cursor-pointer mx-2 relative ${
addressId == index
? "border-2 !border-green-600 rounded-lg bg-green-50"
: ""
}`}
>
<path
d="M94 10.125C47.418 10.125 9.625 46.0957 9.625 90.3984C9.625 141.375 65.875 222.158 86.5293 250.061C87.3866 251.238 88.5103 252.197 89.8087 252.858C91.107 253.518 92.5432 253.863 94 253.863C95.4568 253.863 96.893 253.518 98.1913 252.858C99.4897 252.197 100.613 251.238 101.471 250.061C122.125 222.17 178.375 141.416 178.375 90.3984C178.375 46.0957 140.582 10.125 94 10.125Z"
stroke="black"
stroke-width="18.75"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M94 122.625C109.533 122.625 122.125 110.033 122.125 94.5C122.125 78.967 109.533 66.375 94 66.375C78.467 66.375 65.875 78.967 65.875 94.5C65.875 110.033 78.467 122.625 94 122.625Z"
stroke="black"
stroke-opacity="0.37"
stroke-width="18.75"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</div>
<div className="mx-2">
<p className="mb-0 text-[12px] text-gray-500"> {e.address} </p>
<div className="flex rtl px-3 py-4 w-11/12" key={index}>
<div>
<svg
width="20"
height="20"
viewBox="0 0 188 264"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-70 mx-auto "
>
<path
d="M94 10.125C47.418 10.125 9.625 46.0957 9.625 90.3984C9.625 141.375 65.875 222.158 86.5293 250.061C87.3866 251.238 88.5103 252.197 89.8087 252.858C91.107 253.518 92.5432 253.863 94 253.863C95.4568 253.863 96.893 253.518 98.1913 252.858C99.4897 252.197 100.613 251.238 101.471 250.061C122.125 222.17 178.375 141.416 178.375 90.3984C178.375 46.0957 140.582 10.125 94 10.125Z"
stroke="black"
stroke-width="18.75"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M94 122.625C109.533 122.625 122.125 110.033 122.125 94.5C122.125 78.967 109.533 66.375 94 66.375C78.467 66.375 65.875 78.967 65.875 94.5C65.875 110.033 78.467 122.625 94 122.625Z"
stroke="black"
stroke-opacity="0.37"
stroke-width="18.75"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</div>
<div className="mx-2">
<p className="mb-0 text-[12px] text-gray-500">
{" "}
{e.address}{" "}
</p>
</div>
</div>
<div
className={`w-5 h-5 rounded-full mt-4 mx-3 border-2 relative ${
addressId == index
? "border-green-400 bg-green-200"
: "bg-gray-100 border-gray-200 "
}`}
></div>
</div>
))}
</>
) : (
<div className=" p-5 rounded-lg">
<div className="flex justify-center py-5">
<div
className="bg-white shadow w-fit rounded-full text-sm p-4"
onClick={() => CTX.setBottomSheetAddressOpen(true)}
>
افزودن آدرس +{" "}
</div>
</div>
</div>
))}
)}
<div className="text-right flex rtl justify-between border-y-[1px] border-gray-100 mt-3 px-4 ">
<p className="mb-0 text-sm font-medium py-4">زمان و نحوه ارسال</p>
@ -214,56 +241,59 @@ const CheckoutData = () => {
<div>
{shippingData?.map((e, index) => (
<div
className={`flex rtl px-2 py-2 mx-2 mt-5 border-2 border-transparent tr03 cursor-pointer ${
onClick={() => handleShippingID(index)}
className={`flex rtl justify-between cursor-pointer mx-2 ${
shippingId == index
? "border-2 !border-green-600 rounded-lg bg-green-50"
: ""
}`}
onClick={() => handleShippingID(index)}
key={index}
>
<div>
<svg
width="25"
height="25"
viewBox="0 0 234 244"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto opacity-70 mt-2"
>
<path
d="M65.8246 162.813C66.1529 163.999 66.7117 165.11 67.4692 166.081C68.2267 167.052 69.168 167.864 70.2394 168.471C71.3107 169.078 72.4911 169.468 73.7133 169.619C74.9354 169.77 76.1752 169.678 77.3621 169.35C78.5489 169.022 79.6594 168.463 80.6303 167.705C81.6011 166.948 82.4133 166.007 83.0203 164.935C83.6274 163.864 84.0175 162.683 84.1683 161.461C84.3192 160.239 84.2279 158.999 83.8996 157.813L65.8246 162.813ZM11.9996 31.0625C10.8081 30.7145 9.55935 30.6066 8.32582 30.745C7.09228 30.8834 5.89851 31.2654 4.81377 31.8688C3.72903 32.4722 2.77491 33.285 2.00678 34.26C1.23864 35.2351 0.671788 36.353 0.3391 37.5488C0.00641134 38.7447 -0.0854865 39.9947 0.0687392 41.2264C0.222965 42.458 0.620244 43.6468 1.23752 44.7237C1.8548 45.8006 2.6798 46.7442 3.66463 47.4997C4.64947 48.2553 5.77454 48.8077 6.97458 49.125L11.9996 31.0625ZM224.35 168.563C225.57 168.28 226.722 167.756 227.737 167.021C228.752 166.286 229.609 165.355 230.257 164.284C230.906 163.212 231.334 162.021 231.515 160.781C231.695 159.541 231.626 158.278 231.31 157.065C230.994 155.853 230.438 154.716 229.676 153.722C228.913 152.728 227.959 151.897 226.869 151.278C225.78 150.659 224.578 150.264 223.333 150.118C222.089 149.971 220.828 150.076 219.625 150.425L224.35 168.563ZM99.4621 191.488C103.337 205.488 94.8371 220.275 79.7871 224.188L84.4996 242.325C109.212 235.913 124.312 211.05 117.537 186.488L99.4621 191.488ZM79.7871 224.188C64.6371 228.125 49.4371 219.325 45.5371 205.2L27.4621 210.2C34.2121 234.638 59.8871 248.725 84.4996 242.325L79.7871 224.188ZM45.5371 205.2C41.6621 191.2 50.1621 176.413 65.2121 172.5L60.4996 154.375C35.7871 160.788 20.6746 185.638 27.4621 210.2L45.5371 205.2ZM65.2121 172.5C80.3621 168.563 95.5621 177.363 99.4621 191.488L117.537 186.488C110.787 162.05 85.1121 147.963 60.4996 154.363L65.2121 172.5ZM83.8996 157.813L56.9996 60.4375L38.9246 65.4375L65.8246 162.813L83.8996 157.813ZM33.2996 36.9625L11.9996 31.0625L6.97458 49.125L28.2871 55.0375L33.2996 36.9625ZM56.9996 60.4375C55.4136 54.8107 52.3969 49.6907 48.2434 45.5766C44.0899 41.4625 38.9413 38.4948 33.2996 36.9625L28.3121 55.0375C33.6246 56.5125 37.5746 60.55 38.9246 65.4375L56.9996 60.4375ZM110.875 198.063L224.35 168.563L219.637 150.425L106.15 179.925L110.875 198.063Z"
fill="black"
/>
<path
d="M211.562 49.9502C205.5 28.0002 202.462 17.0252 193.562 12.0377C184.637 7.03772 173.325 9.98772 150.7 15.8752L126.7 22.1002C104.075 27.9752 92.7623 30.9252 87.6248 39.5752C82.4748 48.2127 85.4998 59.1877 91.5623 81.1252L97.9998 104.413C104.062 126.35 107.087 137.325 116 142.313C124.912 147.313 136.225 144.363 158.85 138.488L182.85 132.238C205.475 126.363 216.787 123.425 221.937 114.788C224.762 110.038 225.125 104.588 223.862 97.0002"
stroke="black"
stroke-opacity="0.44"
stroke-width="18.75"
stroke-linecap="round"
/>
</svg>
</div>
<div className="mx-2">
<h3 className="mb-0 text-sm text-right font-medium text-primary-500 ">
{e.name}{" "}
</h3>
<p className="mb-0 text-[12px] text-gray-500">
{" "}
حداکثر
<PersianNumber
number={e.workingDays}
style={"text-gray-600 mx-1"}
/>
روز کاری
<small className="mx-2">|</small> هزینه ارسال
<PersianNumber
number={(e.deliveryCost / 10)?.toLocaleString()}
style={"text-gray-600 mx-1"}
/>
هزار تومان
</p>
<div className="flex rtl px-3 py-4" key={index}>
<div>
<svg
width="25"
height="25"
viewBox="0 0 234 244"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto opacity-70 mt-2"
>
<path
d="M65.8246 162.813C66.1529 163.999 66.7117 165.11 67.4692 166.081C68.2267 167.052 69.168 167.864 70.2394 168.471C71.3107 169.078 72.4911 169.468 73.7133 169.619C74.9354 169.77 76.1752 169.678 77.3621 169.35C78.5489 169.022 79.6594 168.463 80.6303 167.705C81.6011 166.948 82.4133 166.007 83.0203 164.935C83.6274 163.864 84.0175 162.683 84.1683 161.461C84.3192 160.239 84.2279 158.999 83.8996 157.813L65.8246 162.813ZM11.9996 31.0625C10.8081 30.7145 9.55935 30.6066 8.32582 30.745C7.09228 30.8834 5.89851 31.2654 4.81377 31.8688C3.72903 32.4722 2.77491 33.285 2.00678 34.26C1.23864 35.2351 0.671788 36.353 0.3391 37.5488C0.00641134 38.7447 -0.0854865 39.9947 0.0687392 41.2264C0.222965 42.458 0.620244 43.6468 1.23752 44.7237C1.8548 45.8006 2.6798 46.7442 3.66463 47.4997C4.64947 48.2553 5.77454 48.8077 6.97458 49.125L11.9996 31.0625ZM224.35 168.563C225.57 168.28 226.722 167.756 227.737 167.021C228.752 166.286 229.609 165.355 230.257 164.284C230.906 163.212 231.334 162.021 231.515 160.781C231.695 159.541 231.626 158.278 231.31 157.065C230.994 155.853 230.438 154.716 229.676 153.722C228.913 152.728 227.959 151.897 226.869 151.278C225.78 150.659 224.578 150.264 223.333 150.118C222.089 149.971 220.828 150.076 219.625 150.425L224.35 168.563ZM99.4621 191.488C103.337 205.488 94.8371 220.275 79.7871 224.188L84.4996 242.325C109.212 235.913 124.312 211.05 117.537 186.488L99.4621 191.488ZM79.7871 224.188C64.6371 228.125 49.4371 219.325 45.5371 205.2L27.4621 210.2C34.2121 234.638 59.8871 248.725 84.4996 242.325L79.7871 224.188ZM45.5371 205.2C41.6621 191.2 50.1621 176.413 65.2121 172.5L60.4996 154.375C35.7871 160.788 20.6746 185.638 27.4621 210.2L45.5371 205.2ZM65.2121 172.5C80.3621 168.563 95.5621 177.363 99.4621 191.488L117.537 186.488C110.787 162.05 85.1121 147.963 60.4996 154.363L65.2121 172.5ZM83.8996 157.813L56.9996 60.4375L38.9246 65.4375L65.8246 162.813L83.8996 157.813ZM33.2996 36.9625L11.9996 31.0625L6.97458 49.125L28.2871 55.0375L33.2996 36.9625ZM56.9996 60.4375C55.4136 54.8107 52.3969 49.6907 48.2434 45.5766C44.0899 41.4625 38.9413 38.4948 33.2996 36.9625L28.3121 55.0375C33.6246 56.5125 37.5746 60.55 38.9246 65.4375L56.9996 60.4375ZM110.875 198.063L224.35 168.563L219.637 150.425L106.15 179.925L110.875 198.063Z"
fill="black"
/>
<path
d="M211.562 49.9502C205.5 28.0002 202.462 17.0252 193.562 12.0377C184.637 7.03772 173.325 9.98772 150.7 15.8752L126.7 22.1002C104.075 27.9752 92.7623 30.9252 87.6248 39.5752C82.4748 48.2127 85.4998 59.1877 91.5623 81.1252L97.9998 104.413C104.062 126.35 107.087 137.325 116 142.313C124.912 147.313 136.225 144.363 158.85 138.488L182.85 132.238C205.475 126.363 216.787 123.425 221.937 114.788C224.762 110.038 225.125 104.588 223.862 97.0002"
stroke="black"
stroke-opacity="0.44"
stroke-width="18.75"
stroke-linecap="round"
/>
</svg>
</div>
<div className="mx-2">
<h3 className="mb-0 text-sm text-right font-medium text-primary-500 ">
{e.name}{" "}
</h3>
<p className="mb-0 text-[12px] text-gray-500">
{" "}
هزینه ارسال
<PersianNumber
number={(e.deliveryCost / 10)?.toLocaleString()}
style={"text-gray-600 mx-1"}
/>
هزار تومان
</p>
</div>
</div>
<div
className={`w-5 h-5 rounded-full mt-6 mx-3 border-2 ${
shippingId == index
? "border-green-400 bg-green-200"
: "bg-gray-100 border-gray-200 "
}`}
></div>
</div>
))}
</div>
@ -452,7 +482,7 @@ const CheckoutData = () => {
<p className="mb-0 ">
<PersianNumber
number={(checkOutData?.totalPrice / 10)?.toLocaleString()}
style={"!text-[14px] !font-semibold text-primary-800"}
style={"!text-[14px] !font-medium text-primary-800"}
/>
</p>
<small className="text-gray-500 text-[12px] mt-1 mx-1">

View File

@ -234,9 +234,9 @@ const ProductData = ({ params, data }) => {
<div className="lg:col-span-6">
<div className="xs:px-[15px] lg:px-[100px]">
<div className="bg-gray-200 rounded-full xs:p-2 lg:p-3 flex w-fit ">
<div className="bg-gray-200 rounded-full xs:p-1 lg:p-3 flex w-fit sticky top-0 ">
<div
className={` rounded-full p-3 cursor-pointer tr03 ${
className={` rounded-full xs:p-2 lg:p-3 cursor-pointer tr03 ${
productBarDetail == 0 ? "bg-primary-500 text-gray-100" : ""
}`}
onClick={() => {
@ -250,7 +250,7 @@ const ProductData = ({ params, data }) => {
<p className=" xs:block lg:hidden mb-0 text-[12px]">مشخصات</p>
</div>
<div
className={` rounded-full p-3 cursor-pointer tr03 ${
className={` rounded-full xs:p-2 lg:p-3 cursor-pointer tr03 ${
productBarDetail == 1 ? "bg-primary-500 text-gray-100" : ""
}`}
onClick={() => {
@ -261,7 +261,7 @@ const ProductData = ({ params, data }) => {
<p className="mb-0 text-[13px] ">روش استفاده</p>
</div>
<div
className={` rounded-full p-3 cursor-pointer tr03 ${
className={` rounded-full xs:p-2 lg:p-3 cursor-pointer tr03 ${
productBarDetail == 2 ? "bg-primary-500 text-gray-100" : ""
}`}
onClick={() => {
@ -272,7 +272,7 @@ const ProductData = ({ params, data }) => {
<p className="mb-0 text-[13px] ">نقد و بررسی</p>
</div>
<div
className={` rounded-full p-3 cursor-pointer tr03 ${
className={` rounded-full xs:p-2 lg:p-3 cursor-pointer tr03 ${
productBarDetail == 3 ? "bg-primary-500 text-gray-100" : ""
}`}
onClick={() => {

View File

@ -13,11 +13,11 @@ import "react-toastify/dist/ReactToastify.css";
import "swiper/css";
import "../../../style/fontiran.css";
import "../../../style/globals.css";
import Goftino from "plugins/Goftino/page";
import { useRouter } from "next/navigation";
import NextTopLoader from "nextjs-toploader";
import Yektanet from "plugins/Goftino/page";
import SideBarNavBarMobile from "@comp/Navbar/SideBarNavBarMobile/page";
import Goftino from "plugins/Goftino/page";
import Yektanet from "plugins/Yektanet/page";
const RootData = ({ children }) => {
const [cart, setCart] = useState([]);
@ -76,7 +76,7 @@ const RootData = ({ children }) => {
let updatedCart;
if (existingItem) {
// If the item is already in the cart, update its count
if (existingItem.count < maxOrderCount) {
if (existingItem.count < maxOrderCount || maxOrderCount == 0) {
updatedCart = prevCart.map((item) =>
item.id === id ? { ...item, count: item.count + 1 } : item
);
@ -85,9 +85,9 @@ const RootData = ({ children }) => {
toast.error(
`
نمیتوانید بیشتراز
${" "}
${maxOrderCount}
${" "}
عدد ثبت کنید `,
{
position: "bottom-right",

View File

@ -172,31 +172,9 @@ const Footer = () => {
قیمت کالا ، نیاز افراد رو برطرف کنیم و تجربه جدیدی از لذت خرید
به وجود بیاریم.
</p>
{/*
<div className="flex rtl justify-center mt-5">
<div className="w-[70px] mx-1">
<Image src={w11} className="opacity-50" />
</div>
<div className="w-[10px] h-[1px] border-[1px] border-gray-500 border-dashed mt-9 opacity-20"></div>
<div className="w-[70px] mx-1">
<Image src={w22} className="opacity-50" />
</div>
<div className="w-[10px] h-[1px] border-[1px] border-gray-500 border-dashed mt-9 opacity-20"></div>
<div className="w-[70px] mx-1">
<Image src={w33} className="opacity-50" />
</div>
<div className="w-[10px] h-[1px] border-[1px] border-gray-500 border-dashed mt-9 opacity-20"></div>
<div className="w-[70px] mx-1">
<Image src={w44} className="opacity-50" />
</div>
<div className="w-[10px] h-[1px] border-[1px] border-gray-500 border-dashed mt-9 opacity-20"></div>
<div className="w-[70px] mx-1">
<Image src={w55} className="opacity-50" />
</div>
</div> */}
<div className="flex ltr justify-center mt-5 ">
<div className=" flex justify-end flex-wrap ">
<div className="lg:flex ltr lg:justify-between mt-5 ">
<div className=" flex flex-wrap mx-auto xs:justify-center lg:justify-end xs:ml-0 ">
<div className="bg-white w-[100px] h-[100px] rounded-3xl mx-2 xs:mt-3 lg:mt-0">
<a
referrerpolicy="origin"
@ -213,7 +191,87 @@ const Footer = () => {
</a>
</div>
<div className="bg-white w-[100px] h-[100px] rounded-3xl mx-2 xs:mt-3 lg:mt-0"></div>
<div className="bg-white w-[300px] h-[100px] rounded-3xl mx-2 xs:mt-3 lg:mt-0"></div>
</div>
<div className="flex xs:justify-center lg:justify-normal rtl xs:mt-5 lg:mt-0">
<div className="bg-white p-2 h-fit rounded-2xl mx-1">
<svg
width="25"
height="25"
viewBox="0 0 226 227"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-60"
>
<path
d="M112.987 55.2129C97.658 55.2129 82.9563 61.3025 72.1167 72.1421C61.2771 82.9817 55.1875 97.6834 55.1875 113.013C55.1875 128.342 61.2771 143.044 72.1167 153.884C82.9563 164.723 97.658 170.813 112.987 170.813C128.317 170.813 143.019 164.723 153.858 153.884C164.698 143.044 170.787 128.342 170.787 113.013C170.787 97.6834 164.698 82.9817 153.858 72.1421C143.019 61.3025 128.317 55.2129 112.987 55.2129ZM112.987 150.55C108.056 150.55 103.174 149.579 98.6177 147.692C94.062 145.805 89.9225 143.039 86.4356 139.552C82.9488 136.065 80.1829 131.926 78.2958 127.37C76.4088 122.814 75.4375 117.932 75.4375 113C75.4375 108.069 76.4088 103.186 78.2958 98.6306C80.1829 94.0749 82.9488 89.9354 86.4356 86.4485C89.9225 82.9617 94.062 80.1958 98.6177 78.3087C103.174 76.4216 108.056 75.4504 112.987 75.4504C122.946 75.4504 132.497 79.4065 139.539 86.4485C146.581 93.4905 150.538 103.042 150.538 113C150.538 122.959 146.581 132.51 139.539 139.552C132.497 146.594 122.946 150.55 112.987 150.55Z"
fill="black"
/>
<path
d="M173.075 66.5623C180.517 66.5623 186.55 60.5293 186.55 53.0873C186.55 45.6453 180.517 39.6123 173.075 39.6123C165.633 39.6123 159.6 45.6453 159.6 53.0873C159.6 60.5293 165.633 66.5623 173.075 66.5623Z"
fill="black"
/>
<path
d="M219.663 39.3875C216.769 31.9148 212.347 25.1285 206.68 19.4632C201.012 13.7979 194.224 9.37839 186.75 6.4875C178.005 3.20446 168.765 1.42926 159.425 1.2375C147.388 0.712499 143.575 0.5625 113.05 0.5625C82.5254 0.5625 78.6129 0.562499 66.6754 1.2375C57.3428 1.41946 48.1099 3.19502 39.3754 6.4875C31.8996 9.37502 25.1099 13.7934 19.4421 19.4591C13.7742 25.1248 9.35325 31.9128 6.46289 39.3875C3.1792 48.1327 1.40807 57.373 1.22539 66.7125C0.687891 78.7375 0.525391 82.55 0.525391 113.087C0.525391 143.612 0.525391 147.5 1.22539 159.462C1.41289 168.812 3.17539 178.037 6.46289 186.8C9.36136 194.272 13.7866 201.057 19.4558 206.722C25.1251 212.387 31.9137 216.807 39.3879 219.7C48.1058 223.115 57.3425 225.017 66.7004 225.325C78.7379 225.85 82.5504 226.012 113.075 226.012C143.6 226.012 147.513 226.012 159.45 225.325C168.789 225.135 178.028 223.364 186.775 220.088C194.247 217.19 201.033 212.766 206.7 207.1C212.367 201.433 216.79 194.647 219.688 187.175C222.975 178.425 224.738 169.2 224.925 159.85C225.463 147.825 225.625 144.013 225.625 113.475C225.625 82.9375 225.625 79.0625 224.925 67.1C224.78 57.6284 223 48.2531 219.663 39.3875ZM204.438 158.537C204.357 165.741 203.042 172.878 200.55 179.637C198.673 184.498 195.799 188.913 192.114 192.596C188.428 196.279 184.012 199.151 179.15 201.025C172.466 203.506 165.405 204.821 158.275 204.912C146.4 205.462 143.05 205.6 112.6 205.6C82.1254 205.6 79.0129 205.6 66.9129 204.912C59.787 204.825 52.7295 203.51 46.0504 201.025C41.1715 199.162 36.7379 196.296 33.0365 192.612C29.3351 188.928 26.4483 184.508 24.5629 179.637C22.106 172.951 20.7918 165.898 20.6754 158.775C20.1379 146.9 20.0129 143.55 20.0129 113.1C20.0129 82.6375 20.0129 79.525 20.6754 67.4125C20.7562 60.2128 22.0711 53.0802 24.5629 46.325C28.3754 36.4625 36.1879 28.7 46.0504 24.925C52.7328 22.4517 59.7882 21.137 66.9129 21.0375C78.8004 20.5 82.1379 20.35 112.6 20.35C143.063 20.35 146.188 20.35 158.275 21.0375C165.406 21.1233 172.467 22.4384 179.15 24.925C184.012 26.8034 188.427 29.6775 192.113 33.3629C195.798 37.0482 198.672 41.4634 200.55 46.325C203.007 53.0119 204.321 60.0645 204.438 67.1875C204.975 79.075 205.113 82.4125 205.113 112.875C205.113 143.325 205.113 146.6 204.575 158.55L204.438 158.537Z"
fill="black"
/>
</svg>
</div>
<div className="bg-white p-2 h-fit rounded-2xl mx-1">
<svg
width="25"
height="25"
viewBox="0 0 300 300"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-60"
>
<g clip-path="url(#clip0_633_2)">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M247.213 55.3746C250.302 54.0745 253.683 53.6261 257.004 54.076C260.325 54.526 263.465 55.8579 266.097 57.9331C268.728 60.0083 270.756 62.751 271.968 65.8756C273.18 69.0002 273.532 72.3926 272.988 75.6996L244.638 247.662C241.888 264.25 223.688 273.762 208.476 265.5C195.751 258.587 176.851 247.937 159.851 236.825C151.351 231.262 125.313 213.45 128.513 200.775C131.263 189.937 175.013 149.212 200.013 125C209.826 115.487 205.351 110 193.763 118.75C164.988 140.475 118.788 173.512 103.513 182.812C90.0381 191.012 83.013 192.412 74.613 191.012C59.288 188.462 45.0756 184.512 33.4756 179.7C17.8006 173.2 18.5631 151.65 33.4631 145.375L247.213 55.3746Z"
fill="black"
/>
</g>
<defs>
<clipPath id="clip0_633_2">
<rect width="300" height="300" fill="white" />
</clipPath>
</defs>
</svg>
</div>
<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"
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"
/>
</svg>
</div>
<div className="bg-white p-2 h-fit rounded-2xl mx-1">
<svg
width="25"
height="25"
viewBox="0 0 300 244"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-60"
>
<path
d="M94.2375 243.763C207.45 243.763 269.381 149.957 269.381 68.7505C269.406 66.113 269.369 63.4755 269.269 60.838C281.322 52.1051 291.728 41.2996 300 28.9255C288.733 33.8806 276.8 37.1531 264.581 38.638C277.455 30.945 287.096 18.8382 291.712 4.56925C279.624 11.7453 266.385 16.7757 252.581 19.438C243.303 9.55719 231.026 3.01145 217.652 0.814699C204.277 -1.38206 190.551 0.892774 178.6 7.28682C166.649 13.6809 157.14 23.8373 151.546 36.1829C145.952 48.5285 144.585 62.3742 147.656 75.5755C123.181 74.3541 99.2371 67.9989 77.378 56.9223C55.519 45.8458 36.2339 30.2957 20.775 11.2817C12.9296 24.8407 10.5366 40.8765 14.0814 56.1352C17.6262 71.3939 26.8433 84.7325 39.8625 93.4442C30.1014 93.1288 20.5536 90.5074 12 85.7942V86.638C12.0239 100.839 16.9466 114.597 25.9373 125.589C34.928 136.582 47.436 144.135 61.35 146.976C56.0676 148.431 50.6106 149.157 45.1313 149.132C41.2672 149.172 37.4094 148.814 33.6187 148.063C37.5449 160.294 45.2021 170.988 55.5157 178.645C65.8293 186.302 78.2816 190.537 91.125 190.757C69.3019 207.875 42.3609 217.166 14.625 217.138C9.73685 217.175 4.85149 216.893 0 216.294C28.1517 234.247 60.8487 243.777 94.2375 243.763Z"
fill="black"
/>
</svg>
</div>
</div>
</div>
</div>

View File

@ -1,18 +1,9 @@
import Script from "next/script";
export default function Yektanet() {
const getYektanet = () => {
export default function Goftino() {
const getGoftiono = () => {
return {
__html: ` !function (t, e, n) {
t.yektanetAnalyticsObject = n, t[n] = t[n] || function () {
t[n].q.push(arguments)
}, t[n].q = t[n].q || [];
var a = new Date, r = a.getFullYear().toString() + "0" + a.getMonth() + "0" + a.getDate() + "0" + a.getHours(),
c = e.getElementsByTagName("script")[0], s = e.createElement("script");
s.id = "ua-script-rqSC1axy"; s.dataset.analyticsobject = n;
s.async = 1; s.type = "text/javascript";
s.src = "https://cdn.yektanet.com/rg_woebegone/scripts_v3/rqSC1axy/rg.complete.js?v=" + r, c.parentNode.insertBefore(s, c)
}(window, document, "yektanet");
__html: ` !function(){var i="Gk1Yld",a=window,d=document;function g(){var g=d.createElement("script"),s="https://www.goftino.com/widget/"+i,l=localStorage.getItem("goftino_"+i);g.async=!0,g.src=l?s+"?o="+l:s;d.getElementsByTagName("head")[0].appendChild(g);}"complete"===d.readyState?g():a.attachEvent?a.attachEvent("onload",g):a.addEventListener("load",g,!1);}();
`,
};
};
@ -21,7 +12,7 @@ export default function Yektanet() {
<>
<Script
strategy="afterInteractive"
dangerouslySetInnerHTML={getYektanet()}
dangerouslySetInnerHTML={getGoftiono()}
/>
</>
);

View File

@ -1,9 +1,18 @@
import Script from "next/script";
export default function Goftino() {
const getGoftiono = () => {
export default function Yektanet() {
const getYektanet = () => {
return {
__html: ` !function(){var i="Gk1Yld",a=window,d=document;function g(){var g=d.createElement("script"),s="https://www.goftino.com/widget/"+i,l=localStorage.getItem("goftino_"+i);g.async=!0,g.src=l?s+"?o="+l:s;d.getElementsByTagName("head")[0].appendChild(g);}"complete"===d.readyState?g():a.attachEvent?a.attachEvent("onload",g):a.addEventListener("load",g,!1);}();
__html: ` !function (t, e, n) {
t.yektanetAnalyticsObject = n, t[n] = t[n] || function () {
t[n].q.push(arguments)
}, t[n].q = t[n].q || [];
var a = new Date, r = a.getFullYear().toString() + "0" + a.getMonth() + "0" + a.getDate() + "0" + a.getHours(),
c = e.getElementsByTagName("script")[0], s = e.createElement("script");
s.id = "ua-script-rqSC1axy"; s.dataset.analyticsobject = n;
s.async = 1; s.type = "text/javascript";
s.src = "https://cdn.yektanet.com/rg_woebegone/scripts_v3/rqSC1axy/rg.complete.js?v=" + r, c.parentNode.insertBefore(s, c)
}(window, document, "yektanet");
`,
};
};
@ -12,7 +21,7 @@ export default function Goftino() {
<>
<Script
strategy="afterInteractive"
dangerouslySetInnerHTML={getGoftiono()}
dangerouslySetInnerHTML={getYektanet()}
/>
</>
);

View File

@ -202,7 +202,7 @@ const BottomSheetAddress = () => {
type="text"
name="address"
className="form-control bg-white !border-[1px] focus:!border-[1px] border-gray-400 focus:!border-gray-300 rounded-lg text-right !text-sm tr03 "
placeholder="2"
placeholder="اسم محله , خیابان , کوچه"
onChange={(e) => {
setAddress(e.target.value);
validator.current.showMessageFor("address");
@ -230,7 +230,7 @@ const BottomSheetAddress = () => {
type="text"
name="plaque"
className="form-control bg-white !border-[1px] focus:!border-[1px] border-gray-400 focus:!border-gray-300 rounded-lg text-right !text-sm tr03 "
placeholder="24"
placeholder=" 10"
onChange={(e) => {
setPlaque(e.target.value);
validator.current.showMessageFor("plaque");
@ -322,6 +322,7 @@ const BottomSheetAddress = () => {
<div className="p-3">
<label className="float-right mx-3 text-sm my-2 rtl">
نام گرینده
<small className="text-red-500 mx-1">*</small>
</label>
<input
@ -356,6 +357,7 @@ const BottomSheetAddress = () => {
<div className="p-3">
<label className="float-right mx-3 text-sm my-2 rtl">
شماره گرینده
<small className="text-red-500 mx-1">*</small>
</label>
<input

View File

@ -58,6 +58,17 @@ 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"],
// };
export default function RootLayout({ children }) {
// if (process.env.NEXT_PUBLIC_IS_DEV === "false") {
//
@ -66,6 +77,15 @@ export default function RootLayout({ children }) {
return (
<html lang="en">
{/* <head>
<script
key="structured-data"
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify(structuredData),
}}
/>
</head> */}
<body>
<RootData>{children}</RootData>
</body>

View File

@ -16,12 +16,12 @@ export async function generateMetadata({ params }) {
);
const metadataUrl = new URL(
`products/${params.id[0]}/${decodedName}`,
`products/${params.id[0]}/${data?.product?.persianName}`,
process.env.NEXT_PUBLIC_APP_URL
);
return {
title: decodedName,
description: ` خرید ${decodedName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`,
description: `خرید ${data?.product?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`,
metadataBase: metadataUrl,
product_id_meta: data?.product?.id,
keywords: [
@ -33,8 +33,8 @@ export async function generateMetadata({ params }) {
],
openGraph: {
title: decodedName,
description: ` خرید ${decodedName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`,
title: data?.product?.persianName,
description: ` خرید ${data?.product?.persianName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`,
images: [imageUrl],
url: metadataUrl,
type: "website",
@ -43,15 +43,15 @@ export async function generateMetadata({ params }) {
},
twitter: {
site: "@vesmehstore",
description: ` خرید ${decodedName}| برندهای متنوع با پایین ترین قیمت | فروشگاه اینترنتی وسمه`,
title: decodedName,
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,
product_old_price: data?.product?.cost,
product_price: data?.product?.costWithDiscount / 10,
product_old_price: data?.product?.cost / 10,
availability: data?.product?.stock > 0 ? "instock" : "outofstock",
guarantee: "guarantee_sample",
},