From fded1df2aa10596889b9773878672dfedffae5a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=AD=D8=B3=DB=8C=D9=86=20=D9=85=D8=B9=D8=B5=D9=88=D9=85?= =?UTF-8?q?=DB=8C=20=D9=BE=D9=88=D8=B1?= Date: Tue, 10 Dec 2024 23:35:22 +0330 Subject: [PATCH] fix product brand and text brand and title product --- components/AppsComponent/BrandData/page.jsx | 28 ++++++++++-- .../AppsComponent/CategoriesData/page.jsx | 7 +++ src/app/brands/[...id]/page.jsx | 18 +++++++- src/app/categories/[...id]/page.jsx | 26 +++++------ src/app/products/[...id]/page.jsx | 45 +++++++++++-------- 5 files changed, 85 insertions(+), 39 deletions(-) diff --git a/components/AppsComponent/BrandData/page.jsx b/components/AppsComponent/BrandData/page.jsx index 96ca68b..e9ba150 100644 --- a/components/AppsComponent/BrandData/page.jsx +++ b/components/AppsComponent/BrandData/page.jsx @@ -10,10 +10,10 @@ import PersianNumber from "plugins/PersianNumber"; import logo from "../../../public/images/logo.png"; import AppContext from "@ctx/AppContext"; import CardNormal from "@comp/Cards/CardNormal/page"; +import Link from "next/link"; -const BrandData = ({ params, data }) => { +const BrandData = ({ params, data, product }) => { const CTX = useContext(AppContext); - const hairCosmeticData = CTX.state.hairCosmeticData; useEffect(() => { CTX.fetchHairCosmetic(); @@ -40,13 +40,35 @@ const BrandData = ({ params, data }) => {

+
+
+
+
- {hairCosmeticData?.products?.map((e) => ( + {product?.products?.map((e) => (
))}
+ + {product?.products?.length >= 19 && ( +
+ +
+

+ مشاهده بیشتر{" "} +

+
+ +
+ )}
diff --git a/components/AppsComponent/CategoriesData/page.jsx b/components/AppsComponent/CategoriesData/page.jsx index 2525827..d8f6eb1 100644 --- a/components/AppsComponent/CategoriesData/page.jsx +++ b/components/AppsComponent/CategoriesData/page.jsx @@ -249,6 +249,13 @@ export default function CategoriesData({ params, products }) { /> )} + {/*
+
+
*/} +