From 4710e3573a8af2f38f03f8da4a2ab9d7f3115415 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 2 Sep 2024 13:38:56 +0700 Subject: delete fungsi loop --- src/lib/home/components/CategoryDynamic.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/home/components/CategoryDynamic.jsx b/src/lib/home/components/CategoryDynamic.jsx index 48a60323..0ab9312a 100644 --- a/src/lib/home/components/CategoryDynamic.jsx +++ b/src/lib/home/components/CategoryDynamic.jsx @@ -27,8 +27,8 @@ const CategoryDynamic = () => { updatedCategoryData[category.categoryIdI] = countLevel1?.numFound; - for (const subCategory of countLevel1.children) { - updatedSubCategoryData[subCategory.id] = subCategory.numFound; + for (const subCategory of countLevel1?.children) { + updatedSubCategoryData[subCategory.id] = subCategory?.numFound; } } @@ -42,7 +42,6 @@ const CategoryDynamic = () => { const swiperBanner = { modules: [Pagination, ], - loop: true, classNames:'mySwiper', slidesPerView: 3, spaceBetween:10, @@ -84,10 +83,10 @@ const CategoryDynamic = () => { alt={subCategory.name} width={90} height={30} - className='object-fit' + className='object-fit p-4' />
-
{subCategory.name}
+
{subCategory?.name}

{countLevel2} Produk tersedia -- cgit v1.2.3