From 9a471fdf2fd6bcb52678c803c4b0b76f5e3417e9 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 28 Apr 2023 10:05:51 +0700
Subject: banner and link

---
 src/pages/index.jsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/pages/index.jsx')

diff --git a/src/pages/index.jsx b/src/pages/index.jsx
index f1df4e13..a5d9fd2d 100644
--- a/src/pages/index.jsx
+++ b/src/pages/index.jsx
@@ -8,7 +8,7 @@ import { NextSeo } from 'next-seo'
 import Seo from '@/core/components/Seo'
 import { useQuery } from 'react-query'
 import odooApi from '@/core/api/odooApi'
-import Image from '@/core/components/elements/Image/Image'
+import Image from 'next/image'
 import FlashSale from '@/lib/flashSale/components/FlashSale'
 
 const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout'))
@@ -30,7 +30,7 @@ const CategoryHomeId = dynamic(() => import('@/lib/home/components/CategoryHomeI
 })
 
 export default function Home() {
-  const fetchSecondHeroBanner = async () => await odooApi('GET', '/api/v1/banner?type=index-b-2')
+  const fetchSecondHeroBanner = async () => await odooApi('GET', '/api/v1/banner?type=index-a-2')
   const secondHeroBanner = useQuery('secondHeroBanner', fetchSecondHeroBanner)
 
   const bannerRef = useRef(null)
@@ -58,12 +58,12 @@ export default function Home() {
       <DesktopView>
         <div className='container mx-auto'>
           <div className='flex h-[360px]' ref={wrapperRef} onLoad={handleOnLoad}>
-            <div className='w-3/12'>
+            <div className='w-2/12'>
               {secondHeroBanner.isFetched && (
-                <Image src={secondHeroBanner.data[0].image} alt={secondHeroBanner.data[0].name} />
+                <Image src={secondHeroBanner.data[0].image} width={512} height={1024} alt={secondHeroBanner.data[0].name} className='object-cover object-center h-full' />
               )}
             </div>
-            <div className='w-6/12 px-1' ref={bannerRef}>
+            <div className='w-7/12 px-1' ref={bannerRef}>
               <HeroBanner />
             </div>
             <div className='w-3/12'>
-- 
cgit v1.2.3

