From 1b4d7f65ee08a56ca6cc57bfc6336ca3ccad3a21 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Tue, 3 Dec 2024 14:42:36 +0700
Subject: update performance desktop

---
 src/components/ui/HeroBanner.jsx | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

(limited to 'src/components/ui/HeroBanner.jsx')

diff --git a/src/components/ui/HeroBanner.jsx b/src/components/ui/HeroBanner.jsx
index 2eea5915..3025fc1e 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,10 +50,6 @@ 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;
 
@@ -63,14 +57,11 @@ const HeroBanner = () => {
       <SwiperSlide key={index}>
         <Link href={banner.url} className='w-full h-auto'>
           <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'}
+            loading='eager'
             placeholder='blur'
             blurDataURL='/images/indoteknik-placeholder.png'
             sizes='(max-width: 768px) 100vw, 50vw'
-- 
cgit v1.2.3


From 4c8d08def514cb441007c0bd2bc78e105e6d0153 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Wed, 4 Dec 2024 11:50:21 +0700
Subject: cr popup information method

---
 src/components/ui/HeroBanner.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/ui/HeroBanner.jsx')

diff --git a/src/components/ui/HeroBanner.jsx b/src/components/ui/HeroBanner.jsx
index 3025fc1e..6f1ef641 100644
--- a/src/components/ui/HeroBanner.jsx
+++ b/src/components/ui/HeroBanner.jsx
@@ -55,7 +55,7 @@ const HeroBanner = () => {
 
     return heroBanner.map((banner, index) => (
       <SwiperSlide key={index}>
-        <Link href={banner.url} className='w-full h-auto'>
+        <Link href={banner.url} className='w-full h-auto' aria-label={banner.name}>
           <Image
             src={banner.image}
             alt={banner.name}
-- 
cgit v1.2.3


From 0ef6dd27b4c516c6948e8107c9e2477fca9f069f Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Fri, 6 Dec 2024 11:02:51 +0700
Subject: update performance

---
 src/components/ui/HeroBanner.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/ui/HeroBanner.jsx')

diff --git a/src/components/ui/HeroBanner.jsx b/src/components/ui/HeroBanner.jsx
index 6f1ef641..d5ff6247 100644
--- a/src/components/ui/HeroBanner.jsx
+++ b/src/components/ui/HeroBanner.jsx
@@ -55,16 +55,16 @@ const HeroBanner = () => {
 
     return heroBanner.map((banner, index) => (
       <SwiperSlide key={index}>
-        <Link href={banner.url} className='w-full h-auto' aria-label={banner.name}>
+        <Link href={banner?.url} aria-label={banner.name}>
           <Image
             src={banner.image}
             alt={banner.name}
             width={1152}
             height={768}
-            loading='eager'
             placeholder='blur'
             blurDataURL='/images/indoteknik-placeholder.png'
             sizes='(max-width: 768px) 100vw, 50vw'
+            priority={true}
           />
         </Link>
       </SwiperSlide>
-- 
cgit v1.2.3

