From b02510e26e7e9bc292a1779bd23801014b94aad4 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 26 Apr 2023 17:23:52 +0700
Subject: flash sale and countdown

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

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

diff --git a/src/pages/index.jsx b/src/pages/index.jsx
index 2a996b5d..a98fb6b3 100644
--- a/src/pages/index.jsx
+++ b/src/pages/index.jsx
@@ -9,6 +9,7 @@ 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 FlashSale from '@/lib/flashSale/components/FlashSale'
 
 const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout'))
 
@@ -72,6 +73,7 @@ export default function Home() {
 
           <div className='my-16 flex flex-col gap-y-10'>
             <PreferredBrand />
+            <FlashSale />
             <CategoryHomeId />
           </div>
         </div>
-- 
cgit v1.2.3


From 5d8ad078bdc735e708654e278b226868dc3bc403 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 27 Apr 2023 16:45:05 +0700
Subject: flash sale mapping, mobile flash sale

---
 src/pages/index.jsx | 1 +
 1 file changed, 1 insertion(+)

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

diff --git a/src/pages/index.jsx b/src/pages/index.jsx
index a98fb6b3..f1df4e13 100644
--- a/src/pages/index.jsx
+++ b/src/pages/index.jsx
@@ -83,6 +83,7 @@ export default function Home() {
         <HeroBanner />
         <div className='flex flex-col gap-y-6 my-6'>
           <PreferredBrand />
+          <FlashSale />
           <PopularProduct />
           <CategoryHomeId />
         </div>
-- 
cgit v1.2.3


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


From b4abdb00ef83aa824e8a05d5b75df48adb7b9629 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 3 May 2023 10:38:52 +0700
Subject: semi dynamic page

---
 src/pages/index.jsx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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

diff --git a/src/pages/index.jsx b/src/pages/index.jsx
index a5d9fd2d..9c434660 100644
--- a/src/pages/index.jsx
+++ b/src/pages/index.jsx
@@ -60,7 +60,13 @@ export default function Home() {
           <div className='flex h-[360px]' ref={wrapperRef} onLoad={handleOnLoad}>
             <div className='w-2/12'>
               {secondHeroBanner.isFetched && (
-                <Image src={secondHeroBanner.data[0].image} width={512} height={1024} alt={secondHeroBanner.data[0].name} className='object-cover object-center h-full' />
+                <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-7/12 px-1' ref={bannerRef}>
-- 
cgit v1.2.3


From 6e816fba49e020bfdc3f1ffa10183b585e87d9c1 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 4 May 2023 15:38:40 +0700
Subject: optimizing performance

---
 src/pages/index.jsx | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

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

diff --git a/src/pages/index.jsx b/src/pages/index.jsx
index 9c434660..5ca7b939 100644
--- a/src/pages/index.jsx
+++ b/src/pages/index.jsx
@@ -3,28 +3,23 @@ import ImageSkeleton from '@/core/components/elements/Skeleton/ImageSkeleton'
 import PopularProductSkeleton from '@/lib/home/components/Skeleton/PopularProductSkeleton'
 import MobileView from '@/core/components/views/MobileView'
 import DesktopView from '@/core/components/views/DesktopView'
-import { useEffect, useRef, useState } from 'react'
-import { NextSeo } from 'next-seo'
+import { useRef } from 'react'
 import Seo from '@/core/components/Seo'
 import { useQuery } from 'react-query'
 import odooApi from '@/core/api/odooApi'
 import Image from 'next/image'
-import FlashSale from '@/lib/flashSale/components/FlashSale'
 
 const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout'))
-
+const FlashSale = dynamic(() => import('@/lib/flashSale/components/FlashSale'))
 const HeroBanner = dynamic(() => import('@/lib/home/components/HeroBanner'), {
   loading: () => <ImageSkeleton />
 })
-
 const PreferredBrand = dynamic(() => import('@/lib/home/components/PreferredBrand'), {
   loading: () => <PopularProductSkeleton />
 })
-
 const PopularProduct = dynamic(() => import('@/lib/home/components/PopularProduct'), {
   loading: () => <PopularProductSkeleton />
 })
-
 const CategoryHomeId = dynamic(() => import('@/lib/home/components/CategoryHomeId'), {
   loading: () => <PopularProductSkeleton />
 })
-- 
cgit v1.2.3

