diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-22 10:15:35 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-22 10:15:35 +0700 |
| commit | 89345a3d1d7201272bff1b4e4a8ffb4fcf5b3e9e (patch) | |
| tree | 7bb6959f868dfe6ad0c26a59c774442b4d9694d2 /src-migrate/modules/promo/components/Hero.tsx | |
| parent | 560493ddac8d1ec013bec55fc3a4eb06ba0e0138 (diff) | |
<iman> add ? to data fetch
Diffstat (limited to 'src-migrate/modules/promo/components/Hero.tsx')
| -rw-r--r-- | src-migrate/modules/promo/components/Hero.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
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> |
