From 3c020236bd95ba485cc7cfb8b11e5972c49bb7b5 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Mon, 22 May 2023 16:54:34 +0700
Subject: delete animation on load

---
 src/components/ui/HeroBanner.jsx | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

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

diff --git a/src/components/ui/HeroBanner.jsx b/src/components/ui/HeroBanner.jsx
index 746de778..d7d3d854 100644
--- a/src/components/ui/HeroBanner.jsx
+++ b/src/components/ui/HeroBanner.jsx
@@ -9,11 +9,10 @@ import DesktopView from '@/core/components/views/DesktopView'
 import MobileView from '@/core/components/views/MobileView'
 import { useMemo } from 'react'
 import Link from '@/core/components/elements/Link/Link'
-import Image from '@/core/components/elements/Image/Image'
+import Image from 'next/image'
 import { useQuery } from 'react-query'
 import { bannerApi } from '@/api/bannerApi'
 import { HeroBannerSkeleton } from '../skeleton/BannerSkeleton'
-import AnimateOnLoad from './AnimateOnLoad'
 
 const swiperBanner = {
   autoplay: {
@@ -43,7 +42,13 @@ const HeroBanner = () => {
     return heroBanner.data?.map((banner, index) => (
       <SwiperSlide key={index}>
         <Link href={banner.url} className='w-full h-auto'>
-          <Image src={banner.image} alt={banner.name} className='w-full h-auto' />
+          <Image
+            src={banner.image}
+            alt={banner.name}
+            width={1152}
+            height={768}
+            className='w-full h-auto'
+          />
         </Link>
       </SwiperSlide>
     ))
@@ -53,7 +58,7 @@ const HeroBanner = () => {
 
   return (
     heroBanner.data && (
-      <AnimateOnLoad>
+      <>
         <MobileView>
           <Swiper {...swiperBannerMobile}>{BannerComponent}</Swiper>
         </MobileView>
@@ -61,7 +66,7 @@ const HeroBanner = () => {
         <DesktopView>
           <Swiper {...swiperBannerDesktop}>{BannerComponent}</Swiper>
         </DesktopView>
-      </AnimateOnLoad>
+      </>
     )
   )
 }
-- 
cgit v1.2.3

