diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-09-02 07:11:07 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-09-02 07:11:07 +0000 |
| commit | 21dd2c7db3e85bb8d16851c2467a722048198c50 (patch) | |
| tree | 7d9d09729f6f587c9ae023875a5e045cfce5412f /src | |
| parent | 52c2165496e7c1fde8363f7bf77aa76ca2b290c0 (diff) | |
| parent | 4710e3573a8af2f38f03f8da4a2ab9d7f3115415 (diff) | |
Merged in update/category-management (pull request #285)
<iman> delete fungsi loop
Approved-by: trisusilo
Diffstat (limited to 'src')
| -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 |
