From 4710e3573a8af2f38f03f8da4a2ab9d7f3115415 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 2 Sep 2024 13:38:56 +0700
Subject: <iman> delete fungsi loop

---
 src/lib/home/components/CategoryDynamic.jsx | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/lib/home/components/CategoryDynamic.jsx')

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
-- 
cgit v1.2.3

