From 89345a3d1d7201272bff1b4e4a8ffb4fcf5b3e9e Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 22 Aug 2024 10:15:35 +0700
Subject: <iman> add ? to data fetch

---
 src-migrate/modules/promo/components/Hero.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src-migrate/modules/promo/components/Hero.tsx')

diff --git a/src-migrate/modules/promo/components/Hero.tsx b/src-migrate/modules/promo/components/Hero.tsx
index c5f0afad..97cbe0b7 100644
--- a/src-migrate/modules/promo/components/Hero.tsx
+++ b/src-migrate/modules/promo/components/Hero.tsx
@@ -60,12 +60,12 @@ const Hero = () => {
       <DesktopView>
         <div className={style['wrapper']}>
             <Swiper {...swiperBanner}>
-              {banners.map((banner, index) => (
+              {banners?.map((banner, index) => (
                 <SwiperSlide key={index} className='flex flex-row'>
                   <div className={style['desc-section']}>
-                    <div className={style['title']}>{banner.headlineBanner? banner.headlineBanner : "Pasti Hemat & Untung Selama Belanja di Indoteknik.com!"}</div>
+                    <div className={style['title']}>{banner?.headlineBanner? banner?.headlineBanner : "Pasti Hemat & Untung Selama Belanja di Indoteknik.com!"}</div>
                     <div className='h-4' />
-                    <div className={style['subtitle']}>{banner.descriptionBanner? banner.descriptionBanner : "Cari paket yang kami sediakan dengan penawaran harga & Nikmati kemudahan dalam setiap transaksi dengan fitur lengkap Pembayaran hingga barang sampai!"}</div>
+                    <div className={style['subtitle']}>{banner?.descriptionBanner? banner?.descriptionBanner : "Cari paket yang kami sediakan dengan penawaran harga & Nikmati kemudahan dalam setiap transaksi dengan fitur lengkap Pembayaran hingga barang sampai!"}</div>
                   </div>
                   <div className={style['banner-section']}>
                     <Image
@@ -89,8 +89,8 @@ const Hero = () => {
                       width={439}
                       height={150}
                       quality={100}
-                      src={banner.image}
-                      alt={banner.name}
+                      src={banner?.image}
+                      alt={banner?.name}
                       className='w-full h-full object-cover object-center rounded-2xl'
                     />
               </SwiperSlide>
-- 
cgit v1.2.3

