summaryrefslogtreecommitdiff
path: root/src/components/ui/HeroBannerSecondary.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-10-02 10:40:49 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-10-02 10:40:49 +0700
commitccb42e4cd91671d2dff6de30a16809756f83b35c (patch)
tree0689f322d01d36a1db60b54adb117839e5730362 /src/components/ui/HeroBannerSecondary.jsx
parent35c40c565730c80948a226d8de7478e6c3b86478 (diff)
parent2e6ce4c69cd15066fb6af35c2d7bf92d4316c9c9 (diff)
Merge branch 'new-release' into Feature/switch-account
Diffstat (limited to 'src/components/ui/HeroBannerSecondary.jsx')
-rw-r--r--src/components/ui/HeroBannerSecondary.jsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/ui/HeroBannerSecondary.jsx b/src/components/ui/HeroBannerSecondary.jsx
index b1023990..a7b32a4a 100644
--- a/src/components/ui/HeroBannerSecondary.jsx
+++ b/src/components/ui/HeroBannerSecondary.jsx
@@ -18,18 +18,22 @@ const HeroBannerSecondary = () => {
if (heroBannerSecondary.isLoading) return <HeroBannerSkeleton />
return (
- heroBannerSecondary.data && (
- <Link href={heroBannerSecondary.data[randomIndex].url} className='h-full'>
+ heroBannerSecondary.data && randomIndex !== null && (
+ <Link href={heroBannerSecondary.data[randomIndex].url} className="h-full">
<Image
src={heroBannerSecondary.data[randomIndex].image}
width={512}
height={1024}
alt={heroBannerSecondary.data[randomIndex].name}
- className='object-cover object-center h-full'
+ className="object-cover object-center h-full"
+ loading="lazy"
+ placeholder="blur"
+ blurDataURL="/images/indoteknik-placeholder.png"
+ sizes="(max-width: 768px) 100vw, 50vw"
/>
</Link>
)
- )
+ );
}
export default HeroBannerSecondary