From 2ee6a3b6fab9fcf60debddb66e6018f9af05865c Mon Sep 17 00:00:00 2001 From: soheil khaledabadi Date: Sat, 26 Jul 2025 01:01:06 +0330 Subject: [PATCH] Update -> check config count --- .../productList/components/ListAllProduct.tsx | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/pages/shop/section/productList/components/ListAllProduct.tsx b/src/pages/shop/section/productList/components/ListAllProduct.tsx index cc6ba7d..b86a8d0 100644 --- a/src/pages/shop/section/productList/components/ListAllProduct.tsx +++ b/src/pages/shop/section/productList/components/ListAllProduct.tsx @@ -71,36 +71,48 @@ const ListAllProduct = ({ activeId }: { activeId: number }) => { className="w-full h-full border-4 gap-5 border-spacing-1 shadow-lg shadow-white border-solid border-white rounded-lg p-3 grid max-sm:grid-cols-1 max-md:grid-cols-2 max-lg:grid-cols-3 lg:grid-cols-4" id="listConfig" > + {data?.data?.result?.map((item: Record) => { + const isDisabled = Number(item.max_config) == 0; + return (
- {item.title} -
- {token ? ( - - ) : ( - - )} + } + }} + > + خرید + +
); })} + );