diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-02 13:38:56 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-02 13:38:56 +0700 |
| commit | 4710e3573a8af2f38f03f8da4a2ab9d7f3115415 (patch) | |
| tree | 7d9d09729f6f587c9ae023875a5e045cfce5412f | |
| parent | 52c2165496e7c1fde8363f7bf77aa76ca2b290c0 (diff) | |
<iman> delete fungsi loop
| -rw-r--r-- | src/lib/home/components/CategoryDynamic.jsx | 9 |
1 files changed, 4 insertions, 5 deletions
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' /> <div className='bagian-judul flex flex-col justify-center items-start gap-2 ml-2'> - <div className='font-semibold text-lg mr-2'>{subCategory.name}</div> + <div className='font-semibold text-lg mr-2'>{subCategory?.name}</div> <Skeleton isLoaded={countLevel2 != 0}> <p className={`text-gray_r-10 text-sm`}> {countLevel2} Produk tersedia |
