diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-12-09 15:01:43 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-12-09 15:01:43 +0700 |
| commit | cecccfaf318e0e7c52132cf1d04c90c0df745d14 (patch) | |
| tree | 6828e39e974478995244558ff81d11eac357c026 /src/components/ui/HeroBanner.jsx | |
| parent | f2451beed670dc697aa2026b2df6ad1ad1e90da2 (diff) | |
| parent | bb118223e541504262da4509e9188610539702fe (diff) | |
Merge branch 'new-release' into Feature/pengajuan-tempo
Diffstat (limited to 'src/components/ui/HeroBanner.jsx')
| -rw-r--r-- | src/components/ui/HeroBanner.jsx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/components/ui/HeroBanner.jsx b/src/components/ui/HeroBanner.jsx index 2eea5915..d5ff6247 100644 --- a/src/components/ui/HeroBanner.jsx +++ b/src/components/ui/HeroBanner.jsx @@ -7,9 +7,7 @@ import { Swiper, SwiperSlide } from 'swiper/react'; import Image from 'next/image'; import { useEffect, useMemo, useState } from 'react'; -import { useQuery } from 'react-query'; -import { bannerApi } from '@/api/bannerApi'; import Link from '@/core/components/elements/Link/Link'; import DesktopView from '@/core/components/views/DesktopView'; import MobileView from '@/core/components/views/MobileView'; @@ -52,28 +50,21 @@ const HeroBanner = () => { pagination: { dynamicBullets: false, clickable: true }, }; - const customLoader = ({ src }) => { - return src; // Loader yang mengembalikan URL gambar asli - }; - const BannerComponent = useMemo(() => { if (!heroBanner) return null; return heroBanner.map((banner, index) => ( <SwiperSlide key={index}> - <Link href={banner.url} className='w-full h-auto'> + <Link href={banner?.url} aria-label={banner.name}> <Image - loader={customLoader} src={banner.image} alt={banner.name} width={1152} height={768} - className='w-full h-auto' - priority={index === 0} - loading={index === 0 ? 'eager' : 'lazy'} placeholder='blur' blurDataURL='/images/indoteknik-placeholder.png' sizes='(max-width: 768px) 100vw, 50vw' + priority={true} /> </Link> </SwiperSlide> |
