diff --git a/.eslintrc.json b/.eslintrc.json index bffb357..dfa8f73 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "next/core-web-vitals" + "extends": "next/core-web-vitals", + "rules": { "react/no-unescaped-entities": 0 } } diff --git a/components/Cards/CardCart/page.jsx b/components/Cards/CardCart/page.jsx index 26b908b..692c3d0 100644 --- a/components/Cards/CardCart/page.jsx +++ b/components/Cards/CardCart/page.jsx @@ -5,7 +5,7 @@ import React, { useContext } from "react"; import logo from "../../../public/images/logo.png"; import p2 from "../../../public/images/product/2.png"; import AppContext from "@ctx/AppContext"; -import AddToCart from "../Components/AddToCart/page"; +import AddToCart from "../Components/AddToCart/Page"; import Link from "next/link"; const CardCart = ({ data }) => { @@ -21,12 +21,14 @@ const CardCart = ({ data }) => { width={100} height={100} className="xs:!w-[110px] lg:!w-[130px] mx-auto !object-cover" + alt="" /> ) : (
)} diff --git a/components/Cards/CardCategories/page.jsx b/components/Cards/CardCategories/page.jsx index 0ed8ce3..dac9962 100644 --- a/components/Cards/CardCategories/page.jsx +++ b/components/Cards/CardCategories/page.jsx @@ -6,7 +6,7 @@ import React, { useContext, useState } from "react"; import logo from "../../../public/images/logo.png"; import AppContext from "@ctx/AppContext"; import Link from "next/link"; -import AddToCart from "../Components/AddToCart/page"; +import AddToCart from "../Components/AddToCart/Page"; const CardCategories = ({ data }) => { const CTX = useContext(AppContext); @@ -52,12 +52,14 @@ const CardCategories = ({ data }) => { width={100} height={100} className="xs:!w-[110px] lg:!w-[130px] mx-auto !object-cover" + alt="" /> ) : (
)} diff --git a/components/Cards/CardCategoriesMobile/page.jsx b/components/Cards/CardCategoriesMobile/page.jsx index f3df682..630208a 100644 --- a/components/Cards/CardCategoriesMobile/page.jsx +++ b/components/Cards/CardCategoriesMobile/page.jsx @@ -6,7 +6,7 @@ import React, { useContext, useState } from "react"; import logo from "../../../public/images/logo.png"; import AppContext from "@ctx/AppContext"; import Link from "next/link"; -import AddToCart from "../Components/AddToCart/page"; +import AddToCart from "../Components/AddToCart/Page"; const CardCategoriesMobile = ({ data }) => { const CTX = useContext(AppContext); @@ -22,12 +22,14 @@ const CardCategoriesMobile = ({ data }) => { width={100} height={100} className="xs:!w-[110px] lg:!w-[130px] mx-auto !object-cover" + alt="" /> ) : (
)} diff --git a/components/Cards/CardNormal/page.jsx b/components/Cards/CardNormal/page.jsx index 74b42be..a1b3f11 100644 --- a/components/Cards/CardNormal/page.jsx +++ b/components/Cards/CardNormal/page.jsx @@ -6,7 +6,7 @@ import logo from "../../../public/images/logo.png"; import Image from "next/image"; import PersianNumber from "plugins/PersianNumber"; import AppContext from "@ctx/AppContext"; -import AddToCart from "../Components/AddToCart/page"; +import AddToCart from "../Components/AddToCart/Page"; import Link from "next/link"; const CardNormal = ({ data }) => { @@ -45,12 +45,14 @@ const CardNormal = ({ data }) => { width={100} height={100} className="xs:!w-[110px] lg:!w-[130px] mx-auto !object-cover" + alt="" /> ) : (
)} diff --git a/components/Cards/CardSurprise/page.jsx b/components/Cards/CardSurprise/page.jsx index a7b9ec9..de719ef 100644 --- a/components/Cards/CardSurprise/page.jsx +++ b/components/Cards/CardSurprise/page.jsx @@ -2,7 +2,7 @@ import Image from "next/image"; import PersianNumber from "plugins/PersianNumber"; import React from "react"; import p1 from "../../../public/images/product/1.png"; -import AddToCart from "../Components/AddToCart/page"; +import AddToCart from "../Components/AddToCart/Page"; const CardSurprise = () => { return ( @@ -24,7 +24,11 @@ const CardSurprise = () => { {" "}
- +

diff --git a/components/Category/FilterCategory/page.jsx b/components/Category/FilterCategory/page.jsx index 4163e2c..b149214 100644 --- a/components/Category/FilterCategory/page.jsx +++ b/components/Category/FilterCategory/page.jsx @@ -1,7 +1,7 @@ "use client"; import React, { useContext, useEffect, useState } from "react"; import { Switch } from "@headlessui/react"; -import RangeSlider from "plugins/RangeSlider/page"; +import RangeSlider from "plugins/RangeSlider/Page"; import PersianNumber from "plugins/PersianNumber"; import AppContext from "@ctx/AppContext"; @@ -93,8 +93,11 @@ const FilterCategory = ({

- {brands?.map((e) => ( -
handleFilterBrand(e.name, e.id)}> + {brands?.map((e, index) => ( +
handleFilterBrand(e.name, e.id)} + >
- {products?.map((e) => ( - + {products?.map((e, index) => ( + ))}
diff --git a/components/Category/Mobile/Component/SearchSideBar/page.jsx b/components/Category/Mobile/Component/SearchSideBar/page.jsx index f62f631..b047ad4 100644 --- a/components/Category/Mobile/Component/SearchSideBar/page.jsx +++ b/components/Category/Mobile/Component/SearchSideBar/page.jsx @@ -1,5 +1,5 @@ "use client"; -import SideBarNavBarMobile from "@comp/Navbar/SideBarNavBarMobile/page"; +import SideBarNavBarMobile from "@comp/Navbar/SideBarNavBarMobile/Page"; import AppContext from "@ctx/AppContext"; import React, { useContext } from "react"; diff --git a/components/Category/Mobile/FilterCategoryMobile/page.jsx b/components/Category/Mobile/FilterCategoryMobile/page.jsx index aafb779..f2dd304 100644 --- a/components/Category/Mobile/FilterCategoryMobile/page.jsx +++ b/components/Category/Mobile/FilterCategoryMobile/page.jsx @@ -1,5 +1,5 @@ "use client"; -import SideBarNavBarMobile from "@comp/Navbar/SideBarNavBarMobile/page"; +import SideBarNavBarMobile from "@comp/Navbar/SideBarNavBarMobile/Page"; import AppContext from "@ctx/AppContext"; import BottomSheetFilter from "plugins/bottomSheet/BottomSheetFilter"; import React, { useContext, useEffect, useState } from "react"; diff --git a/components/Category/Mobile/ListProductsMobile/page.jsx b/components/Category/Mobile/ListProductsMobile/page.jsx index 822a6f8..051cf65 100644 --- a/components/Category/Mobile/ListProductsMobile/page.jsx +++ b/components/Category/Mobile/ListProductsMobile/page.jsx @@ -1,6 +1,6 @@ "use client"; -import CardCategoriesMobile from "@comp/Cards/CardCategoriesMobile/page"; -import CardNormal from "@comp/Cards/CardNormal/page"; +import CardCategoriesMobile from "@comp/Cards/CardCategoriesMobile/Page"; +import CardNormal from "@comp/Cards/CardNormal/Page"; import AppContext from "@ctx/AppContext"; import React, { useContext } from "react"; import InfiniteScroll from "react-infinite-scroll-component"; @@ -13,8 +13,8 @@ const ListProductsMobile = (props) => { return ( <>
- {products?.map((e) => ( - + {products?.map((e, index) => ( + ))}
diff --git a/components/Footer/page.jsx b/components/Footer/page.jsx index 98b4e65..44cc007 100644 --- a/components/Footer/page.jsx +++ b/components/Footer/page.jsx @@ -9,7 +9,7 @@ const Footer = () => {
- +

diff --git a/components/LandingPage/BeautySection/page.jsx b/components/LandingPage/BeautySection/page.jsx index bcc25f4..ad67901 100644 --- a/components/LandingPage/BeautySection/page.jsx +++ b/components/LandingPage/BeautySection/page.jsx @@ -6,7 +6,7 @@ import p1 from "../../../public/images/product/1.png"; import p2 from "../../../public/images/product/2.png"; import p3 from "../../../public/images/product/3.png"; import p4 from "../../../public/images/product/4.png"; -import CardNormal from "@comp/Cards/CardNormal/page"; +import CardNormal from "@comp/Cards/CardNormal/Page"; const BeautySection = ({ data }) => { console.log("BeautySection", data); @@ -62,8 +62,8 @@ const BeautySection = ({ data }) => { }, }} > - {data?.map((e) => ( - + {data?.map((e, index) => ( + ))} diff --git a/components/LandingPage/BetweenSexualSection/page.jsx b/components/LandingPage/BetweenSexualSection/page.jsx index 274d3b8..ab87409 100644 --- a/components/LandingPage/BetweenSexualSection/page.jsx +++ b/components/LandingPage/BetweenSexualSection/page.jsx @@ -12,7 +12,7 @@ const BetweenSexualSection = () => {
- +
@@ -41,7 +41,11 @@ const BetweenSexualSection = () => {
- +
@@ -61,7 +65,11 @@ const BetweenSexualSection = () => {
- +
diff --git a/components/LandingPage/BrandsLogoSection/page.jsx b/components/LandingPage/BrandsLogoSection/page.jsx index 14b9975..c2b3d5f 100644 --- a/components/LandingPage/BrandsLogoSection/page.jsx +++ b/components/LandingPage/BrandsLogoSection/page.jsx @@ -1,4 +1,4 @@ -import MovingLogos from "plugins/MovingLogos/page"; +import MovingLogos from "plugins/MovingLogos/Page"; import React from "react"; const BrandsLogoSection = () => { diff --git a/components/LandingPage/HeroSection/page.jsx b/components/LandingPage/HeroSection/page.jsx index 43c07e0..a9cce7c 100644 --- a/components/LandingPage/HeroSection/page.jsx +++ b/components/LandingPage/HeroSection/page.jsx @@ -28,7 +28,7 @@ const HeroSection = () => {
- +
@@ -46,7 +46,7 @@ const HeroSection = () => {
- +
@@ -64,7 +64,7 @@ const HeroSection = () => {
- {" "} + {" "}
@@ -82,7 +82,7 @@ const HeroSection = () => {
- +
@@ -100,7 +100,7 @@ const HeroSection = () => {
- +
@@ -118,7 +118,7 @@ const HeroSection = () => {
- {" "} + {" "}
diff --git a/components/LandingPage/HomeSection/page.jsx b/components/LandingPage/HomeSection/page.jsx index 8e95ddf..4a6c698 100644 --- a/components/LandingPage/HomeSection/page.jsx +++ b/components/LandingPage/HomeSection/page.jsx @@ -7,7 +7,7 @@ import p2 from "../../../public/images/product/2.png"; import p3 from "../../../public/images/product/3.png"; import p4 from "../../../public/images/product/4.png"; import khane from "../../../public/images/khane.jpg"; -import CardNormal from "@comp/Cards/CardNormal/page"; +import CardNormal from "@comp/Cards/CardNormal/Page"; const HomeSection = ({ data }) => { return ( @@ -16,7 +16,7 @@ const HomeSection = ({ data }) => {
- +
@@ -55,8 +55,8 @@ const HomeSection = ({ data }) => { }, }} > - {data?.map((e) => ( - + {data?.map((e, index) => ( + ))} diff --git a/components/LandingPage/SurpriseSection/page.jsx b/components/LandingPage/SurpriseSection/page.jsx index d6fffab..05d9bb4 100644 --- a/components/LandingPage/SurpriseSection/page.jsx +++ b/components/LandingPage/SurpriseSection/page.jsx @@ -7,7 +7,7 @@ import p1 from "../../../public/images/product/1.png"; import p2 from "../../../public/images/product/2.png"; import p3 from "../../../public/images/product/3.png"; import p4 from "../../../public/images/product/4.png"; -import CardNormal from "@comp/Cards/CardNormal/page"; +import CardNormal from "@comp/Cards/CardNormal/Page"; const SurpriseSection = ({ data }) => { console.log("sss injaaaha", data); @@ -64,8 +64,8 @@ const SurpriseSection = ({ data }) => { }, }} > - {data?.map((e) => ( - + {data?.map((e, index) => ( + ))} diff --git a/components/Navbar/CartNavbar/page.jsx b/components/Navbar/CartNavbar/page.jsx index 0cb9c94..3d548e8 100644 --- a/components/Navbar/CartNavbar/page.jsx +++ b/components/Navbar/CartNavbar/page.jsx @@ -1,5 +1,5 @@ "use client"; -import CardCart from "@comp/Cards/CardCart/page"; +import CardCart from "@comp/Cards/CardCart/Page"; import AppContext from "@ctx/AppContext"; import Link from "next/link"; import PersianNumber from "plugins/PersianNumber"; @@ -48,8 +48,8 @@ const CartNavbar = (props) => { {/*
*/}
- {cart.map((e) => ( - + {cart.map((e, index) => ( + ))}
diff --git a/components/Navbar/SideBarNavBarMobile/page.jsx b/components/Navbar/SideBarNavBarMobile/page.jsx index 68c4885..dc2f258 100644 --- a/components/Navbar/SideBarNavBarMobile/page.jsx +++ b/components/Navbar/SideBarNavBarMobile/page.jsx @@ -85,6 +85,7 @@ const SideBarNavBarMobile = () => { setFirstChild(dataNav[index].children); setFirstChildIndex(index); }} + key={index} >

{e.name}

@@ -123,8 +124,8 @@ const SideBarNavBarMobile = () => {

{" "} - {firstChild.map((e) => ( -
  • + {firstChild.map((e, index) => ( +
  • CTX.setCloseNavbar(false)} diff --git a/components/Navbar/page.jsx b/components/Navbar/page.jsx index 4ef053f..f7e1e86 100644 --- a/components/Navbar/page.jsx +++ b/components/Navbar/page.jsx @@ -11,11 +11,11 @@ import { Menu } from "@headlessui/react"; import { motion } from "framer-motion"; import Link from "next/link"; import PersianNumber from "plugins/PersianNumber"; -import CartNavbar from "./CartNavbar/page"; +import CartNavbar from "./CartNavbar/Page"; import AppContext from "@ctx/AppContext"; import BottomSheetCart from "plugins/bottomSheet/BottomSheetCart"; import { BottomSheet } from "react-spring-bottom-sheet"; -import SearchSideBar from "@comp/Category/Mobile/Component/SearchSideBar/page"; +import SearchSideBar from "@comp/Category/Mobile/Component/SearchSideBar/Page"; const Navbar = ({ theme }) => { const [open, setOpen] = useState(false); @@ -77,7 +77,7 @@ const Navbar = ({ theme }) => { } `} > - +
  • @@ -202,6 +202,7 @@ const Navbar = ({ theme }) => { ${theme == 0 && isScrolled ? "text-gray-900" : ""}`} onMouseEnter={() => handleItemNavber(index)} onMouseLeave={() => setNavItemHover(null)} + key={index} > {e.name}{" "}

    @@ -229,7 +230,7 @@ const Navbar = ({ theme }) => { }`} >
    - +
    {
      {navItemHover != null && dataNav && - dataNav[navItemHover].children.map((e) => ( -
    • + dataNav[navItemHover].children.map((e, index) => ( +
    • @@ -275,8 +276,11 @@ const Navbar = ({ theme }) => { {/* ======hear==== */} {e.children && e.children.length > 0 && (
      - {e.children.map((child) => ( - + {e.children.map((child, index) => ( +

      {

      @@ -328,7 +333,7 @@ const Navbar = ({ theme }) => {
    - +

    @@ -348,9 +353,9 @@ const Navbar = ({ theme }) => { {" "}
    {isScrolled ? ( - + ) : ( - + )}
    diff --git a/plugins/Gallery/page.jsx b/plugins/Gallery/page.jsx index 869064e..f0720c2 100644 --- a/plugins/Gallery/page.jsx +++ b/plugins/Gallery/page.jsx @@ -28,12 +28,14 @@ const GalleryBox = ({ file }) => { height={350} className=" mx-auto !object-cover" onClick={() => CTX.setIsOpenLightBox(true)} + alt="" /> ) : (
    )} diff --git a/plugins/Input/page.jsx b/plugins/Input/page.jsx index 8165edc..01b3a6b 100644 --- a/plugins/Input/page.jsx +++ b/plugins/Input/page.jsx @@ -58,7 +58,11 @@ const Input = ({ )} {selectData && - selectData.map((e) => )} + selectData.map((e, index) => ( + + ))} ) : ( { x-ref="logos" className="flex items-center justify-center md:justify-start [&_li]:mx-5 [&_img]:max-w-none animate-infinite-scroll hover:animate-infinite-scroll2" > - {logos.map((e) => ( -
  • + {logos.map((e, index) => ( +
  • { {/*
    */}
    - {cart.map((e) => ( - + {cart.map((e, index) => ( + ))}
  • diff --git a/plugins/bottomSheet/BottomSheetDeleteAddress.jsx b/plugins/bottomSheet/BottomSheetDeleteAddress.jsx index 3398383..8af3547 100644 --- a/plugins/bottomSheet/BottomSheetDeleteAddress.jsx +++ b/plugins/bottomSheet/BottomSheetDeleteAddress.jsx @@ -1,6 +1,6 @@ "use client"; -import CardCart from "@comp/Cards/CardCart/page"; +import CardCart from "@comp/Cards/CardCart/Page"; import AppContext from "@ctx/AppContext"; import Link from "next/link"; import PersianNumber from "plugins/PersianNumber"; diff --git a/plugins/bottomSheet/BottomSheetDiscount.jsx b/plugins/bottomSheet/BottomSheetDiscount.jsx index e9552e8..bee4ff4 100644 --- a/plugins/bottomSheet/BottomSheetDiscount.jsx +++ b/plugins/bottomSheet/BottomSheetDiscount.jsx @@ -1,6 +1,6 @@ "use client"; -import CardCart from "@comp/Cards/CardCart/page"; +import CardCart from "@comp/Cards/CardCart/Page"; import AppContext from "@ctx/AppContext"; import Link from "next/link"; import Chapar from "plugins/Chapar"; diff --git a/plugins/bottomSheet/BottomSheetFilter.jsx b/plugins/bottomSheet/BottomSheetFilter.jsx index a3c2ba0..d72b2a4 100644 --- a/plugins/bottomSheet/BottomSheetFilter.jsx +++ b/plugins/bottomSheet/BottomSheetFilter.jsx @@ -1,7 +1,7 @@ "use client"; -import CardCart from "@comp/Cards/CardCart/page"; -import FilterCategory from "@comp/Category/FilterCategory/page"; +import CardCart from "@comp/Cards/CardCart/Page"; +import FilterCategory from "@comp/Category/FilterCategory/Page"; import AppContext from "@ctx/AppContext"; import PersianNumber from "plugins/PersianNumber"; import React, { useContext } from "react"; diff --git a/plugins/bottomSheet/BottomSheetLogOut.jsx b/plugins/bottomSheet/BottomSheetLogOut.jsx index 12d8232..e154c61 100644 --- a/plugins/bottomSheet/BottomSheetLogOut.jsx +++ b/plugins/bottomSheet/BottomSheetLogOut.jsx @@ -1,6 +1,6 @@ "use client"; -import CardCart from "@comp/Cards/CardCart/page"; +import CardCart from "@comp/Cards/CardCart/Page"; import AppContext from "@ctx/AppContext"; import Link from "next/link"; import { useRouter } from "next/navigation"; diff --git a/src/app/about-us/page.jsx b/src/app/about-us/page.jsx index b293d1a..9488c63 100644 --- a/src/app/about-us/page.jsx +++ b/src/app/about-us/page.jsx @@ -1,9 +1,9 @@ -import Footer from "@comp/Footer/page"; -import Navbar from "@comp/Navbar/page"; +import Footer from "@comp/Footer/Page"; +import Navbar from "@comp/Navbar/Page"; import PersianNumber from "plugins/PersianNumber"; import React from "react"; -const page = () => { +const Page = () => { const number = "02188195164"; return ( <> @@ -15,8 +15,7 @@ const page = () => {

    - {" "} - , + {", "}

    @@ -150,16 +149,16 @@ const page = () => { جوایز و تقدیر در وسمه

    - ما در "وسمه" مفتخریم که به خاطر کاری که هر روز از طرف مشتریان، + ما در وسمه مفتخریم که به خاطر کاری که هر روز از طرف مشتریان، کارمندان و جوامع خود انجام می‌دهیم، مورد تقدیر قرار می‌گیریم. این تقدیر و اعتراف‌ها، نشان از ارزشی است که ما برای ارتباط مستمر و - صادقانه با همه‌ی اعضای جامعه‌ی ما قائل هستیم. همه‌ی تلاش ما در - "وسمه" به منظور ارائه‌ی بهترین تجربه‌ی ممکن برای مشتریان عزیزمان - است. از انتخاب محصولات با کیفیت تا ارائه‌ی خدمات استثنایی، ما به دقت - به نیازها و خواسته‌های شما توجه می‌کنیم تا اطمینان حاصل شود که هرگز - از "وسمه" ناراضی نخواهید شد. با تمام وجود و انگیزه‌ی بی‌پایان، ما به + صادقانه با همه‌ی اعضای جامعه‌ی ما قائل هستیم. همه‌ی تلاش ما در وسمه + به منظور ارائه‌ی بهترین تجربه‌ی ممکن برای مشتریان عزیزمان است. از + انتخاب محصولات با کیفیت تا ارائه‌ی خدمات استثنایی، ما به دقت به + نیازها و خواسته‌های شما توجه می‌کنیم تا اطمینان حاصل شود که هرگز از + وسمه ناراضی نخواهید شد. با تمام وجود و انگیزه‌ی بی‌پایان، ما به ارتقاء محصولات و خدماتمان ادامه می‌دهیم تا همیشه بهترین را برای شما - فراهم کنیم. وعده‌ی ما این است که در "وسمه" همیشه یک محیط پذیرایی، + فراهم کنیم. وعده‌ی ما این است که در وسمه همیشه یک محیط پذیرایی، احترام و نوآوری برای شما وجود داشته باشد

    @@ -170,4 +169,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/cart/checkout/page.jsx b/src/app/cart/checkout/page.jsx index a59c523..a6c8a65 100644 --- a/src/app/cart/checkout/page.jsx +++ b/src/app/cart/checkout/page.jsx @@ -1,6 +1,6 @@ "use client"; -import NavBarDownCart from "@comp/Carts/component/NavBarDownCart/page"; -import Navbar from "@comp/Navbar/page"; +import NavBarDownCart from "@comp/Carts/component/NavBarDownCart/Page"; +import Navbar from "@comp/Navbar/Page"; import PersianNumber from "plugins/PersianNumber"; import React, { useContext, useEffect, useState } from "react"; @@ -14,7 +14,7 @@ import BottomSheetAddress from "plugins/bottomSheet/BottomSheetAddress"; import Chapar from "plugins/Chapar"; import { toast } from "react-toastify"; -const page = () => { +const Page = () => { const CTX = useContext(AppContext); const [shippingData, setShippingData] = useState([]); const [shippingId, setShippingID] = useState(null); @@ -152,6 +152,7 @@ const page = () => { : "" }`} onClick={() => setAddressId(index)} + key={index} >
    { : "" }`} onClick={() => handleShippingID(index)} + key={index} >
    { }`} >
    - +

    @@ -292,7 +294,7 @@ const page = () => {
    - +

    @@ -473,4 +475,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/cart/page.jsx b/src/app/cart/page.jsx index 498c3d3..f31050b 100644 --- a/src/app/cart/page.jsx +++ b/src/app/cart/page.jsx @@ -1,7 +1,7 @@ "use client"; -import CardCart from "@comp/Cards/CardCart/page"; -import NavBarDownCart from "@comp/Carts/component/NavBarDownCart/page"; -import Navbar from "@comp/Navbar/page"; +import CardCart from "@comp/Cards/CardCart/Page"; +import NavBarDownCart from "@comp/Carts/component/NavBarDownCart/Page"; +import Navbar from "@comp/Navbar/Page"; import AppContext from "@ctx/AppContext"; import Link from "next/link"; import { useRouter } from "next/navigation"; @@ -10,7 +10,7 @@ import PersianNumber from "plugins/PersianNumber"; import React, { useContext, useEffect } from "react"; import { toast } from "react-toastify"; -const page = () => { +const Page = () => { const CTX = useContext(AppContext); const router = useRouter(); const cart = CTX.state.cart; @@ -69,10 +69,10 @@ const page = () => { closeOnClick: true, }); } - router.push("/cart/checkout"); // Redirect to the checkout page + router.push("/cart/checkout"); // Redirect to the checkout Page } else { // If token does not exist, redirect to login - router.push("/login"); // Redirect to the login page + router.push("/login"); // Redirect to the login Page } }; @@ -100,8 +100,8 @@ const page = () => {

    - {cart?.map((e) => ( - + {cart?.map((e, index) => ( + ))}
    @@ -194,4 +194,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/categories/[id]/page.jsx b/src/app/categories/[id]/page.jsx index 3449a5f..08bf39b 100644 --- a/src/app/categories/[id]/page.jsx +++ b/src/app/categories/[id]/page.jsx @@ -1,17 +1,17 @@ "use client"; -import Navbar from "@comp/Navbar/page"; +import Navbar from "@comp/Navbar/Page"; import React, { useContext, useEffect, useState } from "react"; -import Footer from "@comp/Footer/page"; -import ListProdocts from "@comp/Category/ListProdocts/page"; -import FilterCategoryMobile from "@comp/Category/Mobile/FilterCategoryMobile/page"; -import FilterCategory from "@comp/Category/FilterCategory/page"; -import ListProductsMobile from "@comp/Category/Mobile/ListProductsMobile/page"; -import PaginationCategoory from "@comp/Category/PaginationCategoory/page"; +import Footer from "@comp/Footer/Page"; +import ListProdocts from "@comp/Category/ListProdocts/Page"; +import FilterCategoryMobile from "@comp/Category/Mobile/FilterCategoryMobile/Page"; +import FilterCategory from "@comp/Category/FilterCategory/Page"; +import ListProductsMobile from "@comp/Category/Mobile/ListProductsMobile/Page"; +import PaginationCategoory from "@comp/Category/PaginationCategoory/Page"; import AppContext from "@ctx/AppContext"; import InfiniteScroll from "react-infinite-scroll-component"; -export default function page({ params }) { +export default function Page({ params }) { // const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/product?page=0`); // const products = await res.json(); const CTX = useContext(AppContext); diff --git a/src/app/contact-us/page.jsx b/src/app/contact-us/page.jsx index d7b4f58..e532839 100644 --- a/src/app/contact-us/page.jsx +++ b/src/app/contact-us/page.jsx @@ -1,9 +1,9 @@ -import Footer from "@comp/Footer/page"; -import Navbar from "@comp/Navbar/page"; +import Footer from "@comp/Footer/Page"; +import Navbar from "@comp/Navbar/Page"; import PersianNumber from "plugins/PersianNumber"; import React from "react"; -const page = () => { +const Page = () => { const number = "02188195164"; return ( <> @@ -15,8 +15,7 @@ const page = () => {

    - {" "} - , + {", "}

    @@ -199,9 +198,9 @@ const page = () => { فروشگاه وسمه، ما به دنبال ارائه محصولات با کیفیت و خدماتی استثنایی هستیم تا به شما کمک کنیم تا به بهترین شکل ممکن زندگی کنید. اگر سوالی دارید یا نیاز به راهنمایی دارید، تیم ما همیشه در دسترس است تا به شما - کمک کند. با افتخار ما را در فروشگاه "وسمه" به عنوان همراهی شما در - مسیر زیبایی و اعتماد به نفس خوش آمدید. با احترام و دوستی، تیم - فروشگاه "وسمه + کمک کند. با افتخار ما را در فروشگاه وسمه به عنوان همراهی شما در مسیر + زیبایی و اعتماد به نفس خوش آمدید. با احترام و دوستی، تیم فروشگاه + وسمه

    @@ -244,4 +243,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/faq/page.jsx b/src/app/faq/page.jsx index 1360b79..eb983de 100644 --- a/src/app/faq/page.jsx +++ b/src/app/faq/page.jsx @@ -1,11 +1,11 @@ "use client"; -import Footer from "@comp/Footer/page"; -import Navbar from "@comp/Navbar/page"; +import Footer from "@comp/Footer/Page"; +import Navbar from "@comp/Navbar/Page"; import PersianNumber from "plugins/PersianNumber"; import React, { useEffect, useState } from "react"; -const page = () => { +const Page = () => { const [faq, setFaq] = useState([]); const [faqSelect, setFaqSelect] = useState(0); @@ -52,6 +52,7 @@ const page = () => { faqSelect == index ? "bg-gray-100" : "bg-primary-100" }`} onClick={() => setFaqSelect(index)} + key={index} >
    @@ -78,4 +79,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/layout.jsx b/src/app/layout.jsx index 45f8d10..2e2ca5e 100644 --- a/src/app/layout.jsx +++ b/src/app/layout.jsx @@ -8,7 +8,7 @@ import AppContext from "@ctx/AppContext"; import { useEffect, useState } from "react"; import "react-toastify/dist/ReactToastify.css"; import { ToastContainer, toast } from "react-toastify"; -import Loading from "plugins/Loading/page"; +import Loading from "plugins/Loading/Page"; import "react-spring-bottom-sheet/dist/style.css"; import BottomSheetAddress from "plugins/bottomSheet/BottomSheetAddress"; import citiesJSON from "iranCities"; @@ -173,7 +173,7 @@ export default function RootLayout({ children }) { ); const post = await res.json(); if (paginationSay) { - // If it's a paginated request (not the first page) + // If it's a paginated request (not the first Page) window.scrollTo({ top: 0, behavior: "smooth", // Optional: smooth scrolling behavior @@ -184,16 +184,16 @@ export default function RootLayout({ children }) { } if (post.length <= 19) { - // If the length of fetched products is less than or equal to 19, indicating the last page + // If the length of fetched products is less than or equal to 19, indicating the last Page setStopProducts(true); // Assuming this stops pagination } if (!paginationSay && pageGetProducts == 0) { - // If it's not a paginated request and it's the first page + // If it's not a paginated request and it's the first Page setProducts(post.products); setPager(post.pager); } else if (!paginationSay && pageGetProducts != 0) { - // If it's not a paginated request and it's not the first page + // If it's not a paginated request and it's not the first Page console.log("kir", products, !!products ? products : [], post.products); setProducts((data) => [...(data ? data : []), ...post.products]); } diff --git a/src/app/login/page.jsx b/src/app/login/page.jsx index 6f357aa..c76ca27 100644 --- a/src/app/login/page.jsx +++ b/src/app/login/page.jsx @@ -120,7 +120,7 @@ const Login = () => {
    - +
    {stepLogin == 0 ? ( diff --git a/src/app/page.jsx b/src/app/page.jsx index a529bf9..9f7167d 100644 --- a/src/app/page.jsx +++ b/src/app/page.jsx @@ -1,12 +1,12 @@ "use client"; -import Navbar from "@comp/Navbar/page"; -import Footer from "@comp/Footer/page"; -import HeroSection from "@comp/LandingPage/HeroSection/page"; -import SurpriseSection from "@comp/LandingPage/SurpriseSection/page"; -import BetweenSexualSection from "@comp/LandingPage/BetweenSexualSection/page"; -import BrandsLogoSection from "@comp/LandingPage/BrandsLogoSection/page"; -import BeautySection from "@comp/LandingPage/BeautySection/page"; -import HomeSection from "@comp/LandingPage/HomeSection/page"; +import Navbar from "@comp/Navbar/Page"; +import Footer from "@comp/Footer/Page"; +import HeroSection from "@comp/LandingPage/HeroSection/Page"; +import SurpriseSection from "@comp/LandingPage/SurpriseSection/Page"; +import BetweenSexualSection from "@comp/LandingPage/BetweenSexualSection/Page"; +import BrandsLogoSection from "@comp/LandingPage/BrandsLogoSection/Page"; +import BeautySection from "@comp/LandingPage/BeautySection/Page"; +import HomeSection from "@comp/LandingPage/HomeSection/Page"; import { useEffect, useState } from "react"; export default function Page() { diff --git a/src/app/products/[...id]/page.jsx b/src/app/products/[...id]/page.jsx index 12c808a..b2e2567 100644 --- a/src/app/products/[...id]/page.jsx +++ b/src/app/products/[...id]/page.jsx @@ -1,15 +1,15 @@ "use client"; -import Footer from "@comp/Footer/page"; -import Navbar from "@comp/Navbar/page"; -import GalleryBox from "plugins/Gallery/page"; +import Footer from "@comp/Footer/Page"; +import Navbar from "@comp/Navbar/Page"; +import GalleryBox from "plugins/Gallery/Page"; import React, { useEffect, useState } from "react"; import logo from "../../../../public/images/logo.png"; import Image from "next/image"; import PersianNumber from "plugins/PersianNumber"; -import AddToCart from "@comp/Cards/Components/AddToCart/page"; +import AddToCart from "@comp/Cards/Components/AddToCart/Page"; -const page = ({ params }) => { +const Page = ({ params }) => { const [product, setProduct] = useState([]); const [specificationsHeader, setSpecificationsHeader] = useState([]); @@ -104,8 +104,8 @@ const page = ({ params }) => {
      - {specificationsHeader.map((e) => ( -
    • + {specificationsHeader.map((e, index) => ( +
    • {e} @@ -130,12 +130,14 @@ const page = ({ params }) => { height={350} className=" mx-auto !object-cover" onClick={() => CTX.setIsOpenLightBox(true)} + alt="" /> ) : (

      )} @@ -256,6 +258,7 @@ const page = ({ params }) => { className={ index % 2 === 0 ? "bg-gray-50 p-3" : "bg-gray-100 p-3" } + key={index} >

      {e.title}: @@ -327,4 +330,4 @@ const page = ({ params }) => { ); }; -export default page; +export default Page; diff --git a/src/app/profile/address/page.jsx b/src/app/profile/address/page.jsx index 71eb45d..9ffc67a 100644 --- a/src/app/profile/address/page.jsx +++ b/src/app/profile/address/page.jsx @@ -1,13 +1,13 @@ "use client"; -import Navbar from "@comp/Navbar/page"; +import Navbar from "@comp/Navbar/Page"; import PersianNumber from "plugins/PersianNumber"; import React, { useContext, useEffect } from "react"; -import SideBarProfile from "../component/SideBarProfile/page"; +import SideBarProfile from "../component/SideBarProfile/Page"; import AppContext from "@ctx/AppContext"; import BottomSheetDeleteAddress from "plugins/bottomSheet/BottomSheetDeleteAddress"; -const page = () => { +const Page = () => { const CTX = useContext(AppContext); const addressData = CTX.state.addressData; @@ -55,8 +55,8 @@ const page = () => { - {addressData.map((e) => ( - + {addressData.map((e, index) => ( + {e.province} ، {e.city} ، {e.address} ،{e.plaque} ، @@ -93,4 +93,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/profile/orders/page.jsx b/src/app/profile/orders/page.jsx index 137362d..0629406 100644 --- a/src/app/profile/orders/page.jsx +++ b/src/app/profile/orders/page.jsx @@ -1,9 +1,9 @@ -import Navbar from "@comp/Navbar/page"; +import Navbar from "@comp/Navbar/Page"; import PersianNumber from "plugins/PersianNumber"; import React from "react"; -import SideBarProfile from "../component/SideBarProfile/page"; +import SideBarProfile from "../component/SideBarProfile/Page"; -const page = () => { +const Page = () => { return ( <> @@ -92,4 +92,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/profile/page.jsx b/src/app/profile/page.jsx index c35bd2a..065a703 100644 --- a/src/app/profile/page.jsx +++ b/src/app/profile/page.jsx @@ -1,8 +1,8 @@ -import Navbar from "@comp/Navbar/page"; +import Navbar from "@comp/Navbar/Page"; import React from "react"; -import SideBarProfile from "./component/SideBarProfile/page"; +import SideBarProfile from "./component/SideBarProfile/Page"; -const page = () => { +const Page = () => { return ( <> @@ -57,4 +57,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/purchase-callback/page.jsx b/src/app/purchase-callback/page.jsx index bbfab90..9c4a752 100644 --- a/src/app/purchase-callback/page.jsx +++ b/src/app/purchase-callback/page.jsx @@ -1,11 +1,11 @@ "use client"; -import Footer from "@comp/Footer/page"; -import Navbar from "@comp/Navbar/page"; +import Footer from "@comp/Footer/Page"; +import Navbar from "@comp/Navbar/Page"; import { useSearchParams } from "next/navigation"; import PersianNumber from "plugins/PersianNumber"; import React from "react"; -const page = () => { +const Page = () => { const params = useSearchParams(); const refid = params.get("refid"); const paymentStatus = params.get("paymentStatus"); @@ -92,4 +92,4 @@ const page = () => { ); }; -export default page; +export default Page; diff --git a/src/app/terms-and-conditions/page.jsx b/src/app/terms-and-conditions/page.jsx index 30bec5a..52f5bf4 100644 --- a/src/app/terms-and-conditions/page.jsx +++ b/src/app/terms-and-conditions/page.jsx @@ -1,9 +1,9 @@ -import Footer from "@comp/Footer/page"; -import Navbar from "@comp/Navbar/page"; +import Footer from "@comp/Footer/Page"; +import Navbar from "@comp/Navbar/Page"; import PersianNumber from "plugins/PersianNumber"; import React from "react"; -const page = () => { +const Page = () => { const number = "02188195164"; return ( <> @@ -15,8 +15,7 @@ const page = () => {

      - {" "} - , + {", "}

      @@ -93,4 +92,4 @@ const page = () => { ); }; -export default page; +export default Page;