From c88d98f06a6301bad6dd6d2e58b4908d8562638c Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 7 Jun 2024 17:08:09 +0700
Subject: <iman> add promotion program

---
 src/lib/home/components/PromotionProgram.jsx | 31 ++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 src/lib/home/components/PromotionProgram.jsx

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
new file mode 100644
index 00000000..461383a1
--- /dev/null
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -0,0 +1,31 @@
+import Link from '@/core/components/elements/Link/Link'
+import Image from 'next/image'
+import { bannerApi } from '@/api/bannerApi';
+
+const { useQuery } = require('react-query')
+
+const BannerSection = () => {
+  const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' }));
+
+  return (
+    promotionProgram.data &&
+    promotionProgram.data?.length > 0 && (
+      <div className='grid grid-cols-3 sm:grid-cols-3 gap-4  rounded rounded-md'>
+        {promotionProgram.data?.map((banner) => (
+          <Link key={banner.id} href={banner.url}>
+            <Image
+              width={439}
+              height={150}
+              quality={100}
+              src={banner.image}
+              alt={banner.name}
+              className='h-auto  w-full rounded'
+            />
+          </Link>
+        ))}
+      </div>
+    )
+  )
+}
+
+export default BannerSection
-- 
cgit v1.2.3


From 5e5b67e5b98d3183044dc5149fe67a29feeb3c41 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 10 Jun 2024 16:53:28 +0700
Subject: <iman> update promotion-program

---
 src/lib/home/components/PromotionProgram.jsx | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 461383a1..a3c09a9b 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -1,16 +1,25 @@
 import Link from '@/core/components/elements/Link/Link'
 import Image from 'next/image'
 import { bannerApi } from '@/api/bannerApi';
-
+import useDevice from '@/core/hooks/useDevice'
 const { useQuery } = require('react-query')
-
 const BannerSection = () => {
   const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' }));
+  const { isMobile, isDesktop } = useDevice()
 
   return (
-    promotionProgram.data &&
+    <div className='px-4 sm:px-0'>
+      <div className='flex justify-between items-center mb-4'>
+        <div className='font-semibold sm:text-h-lg'>Promo Tersedia</div>
+        {isDesktop && (
+          <Link href='/shop/promo' className='!text-red-500 font-semibold'>
+            Lihat Semua
+          </Link>
+        )}
+      </div>
+      {promotionProgram.data &&
     promotionProgram.data?.length > 0 && (
-      <div className='grid grid-cols-3 sm:grid-cols-3 gap-4  rounded rounded-md'>
+      <div className='bg-red-300 grid grid-cols-3 sm:grid-cols-3 gap-4   rounded-md'>
         {promotionProgram.data?.map((banner) => (
           <Link key={banner.id} href={banner.url}>
             <Image
@@ -24,7 +33,10 @@ const BannerSection = () => {
           </Link>
         ))}
       </div>
-    )
+      
+    )}
+    </div>
+    
   )
 }
 
-- 
cgit v1.2.3


From 9565ddf794165e297acf511a108f9a9643ee615d Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 11 Jun 2024 13:40:23 +0700
Subject: <iman> update promotion program

---
 src/lib/home/components/PromotionProgram.jsx | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index a3c09a9b..98bc7c7f 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -9,17 +9,19 @@ const BannerSection = () => {
 
   return (
     <div className='px-4 sm:px-0'>
-      <div className='flex justify-between items-center mb-4'>
+      <div className='flex justify-between items-center mb-4 '>
         <div className='font-semibold sm:text-h-lg'>Promo Tersedia</div>
         {isDesktop && (
-          <Link href='/shop/promo' className='!text-red-500 font-semibold'>
-            Lihat Semua
-          </Link>
+          <Link href='/shop/promo'
+          className="rounded-md bg-[#FAD147]  px-3.5 py-2.5 text-sm font-semibold text-neutral-950 shadow-sm hover:bg-yellow-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-yellow-600"
+        >
+          Lihat Semua
+        </Link>
         )}
       </div>
       {promotionProgram.data &&
     promotionProgram.data?.length > 0 && (
-      <div className='bg-red-300 grid grid-cols-3 sm:grid-cols-3 gap-4   rounded-md'>
+      <div className='grid grid-cols-3 sm:grid-cols-3 gap-4   rounded-md'>
         {promotionProgram.data?.map((banner) => (
           <Link key={banner.id} href={banner.url}>
             <Image
@@ -28,7 +30,7 @@ const BannerSection = () => {
               quality={100}
               src={banner.image}
               alt={banner.name}
-              className='h-auto  w-full rounded'
+              className='h-auto  w-full rounded hover:scale-105 transition duration-500 ease-in-out'
             />
           </Link>
         ))}
-- 
cgit v1.2.3


From 01bea5fe1b68fee2d673274b44295db6fc665e29 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 24 Jun 2024 14:36:56 +0700
Subject: <iman> ubah button lihat semua

---
 src/lib/home/components/PromotionProgram.jsx | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 98bc7c7f..66216d19 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -12,9 +12,7 @@ const BannerSection = () => {
       <div className='flex justify-between items-center mb-4 '>
         <div className='font-semibold sm:text-h-lg'>Promo Tersedia</div>
         {isDesktop && (
-          <Link href='/shop/promo'
-          className="rounded-md bg-[#FAD147]  px-3.5 py-2.5 text-sm font-semibold text-neutral-950 shadow-sm hover:bg-yellow-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-yellow-600"
-        >
+          <Link href='/shop/promo' className='!text-red-500 font-semibold'>
           Lihat Semua
         </Link>
         )}
-- 
cgit v1.2.3


From cac51e393df3adfbb2ea971be9a26daf78e6ef90 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 28 Jun 2024 10:13:16 +0700
Subject: <iman> update button lihat semua

---
 src/lib/home/components/PromotionProgram.jsx | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 98bc7c7f..66216d19 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -12,9 +12,7 @@ const BannerSection = () => {
       <div className='flex justify-between items-center mb-4 '>
         <div className='font-semibold sm:text-h-lg'>Promo Tersedia</div>
         {isDesktop && (
-          <Link href='/shop/promo'
-          className="rounded-md bg-[#FAD147]  px-3.5 py-2.5 text-sm font-semibold text-neutral-950 shadow-sm hover:bg-yellow-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-yellow-600"
-        >
+          <Link href='/shop/promo' className='!text-red-500 font-semibold'>
           Lihat Semua
         </Link>
         )}
-- 
cgit v1.2.3


From b5effbf8b6b4927614ab15fcf1f9b8ba1afcdadf Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 28 Jun 2024 11:10:30 +0700
Subject: <iman> update button lihat semua dan promocrumb

---
 src/lib/home/components/PromotionProgram.jsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 66216d19..66ed6749 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -2,19 +2,21 @@ import Link from '@/core/components/elements/Link/Link'
 import Image from 'next/image'
 import { bannerApi } from '@/api/bannerApi';
 import useDevice from '@/core/hooks/useDevice'
+import { div } from 'lodash-contrib';
 const { useQuery } = require('react-query')
 const BannerSection = () => {
   const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' }));
   const { isMobile, isDesktop } = useDevice()
-
+  console.log("promotionProgram",promotionProgram)
   return (
     <div className='px-4 sm:px-0'>
       <div className='flex justify-between items-center mb-4 '>
         <div className='font-semibold sm:text-h-lg'>Promo Tersedia</div>
         {isDesktop && (
-          <Link href='/shop/promo' className='!text-red-500 font-semibold'>
-          Lihat Semua
-        </Link>
+          <div></div>
+        //   <Link href='/shop/promo' className='!text-red-500 font-semibold'>
+        //   Lihat Semua
+        // </Link>
         )}
       </div>
       {promotionProgram.data &&
-- 
cgit v1.2.3


From 1455ce5887a3d03597192118ba84d3c27f165b12 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 28 Jun 2024 11:17:08 +0700
Subject: <iman> delete console log

---
 src/lib/home/components/PromotionProgram.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 66ed6749..c2779fd2 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -7,7 +7,7 @@ const { useQuery } = require('react-query')
 const BannerSection = () => {
   const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' }));
   const { isMobile, isDesktop } = useDevice()
-  console.log("promotionProgram",promotionProgram)
+  
   return (
     <div className='px-4 sm:px-0'>
       <div className='flex justify-between items-center mb-4 '>
-- 
cgit v1.2.3


From ca0faeb73b521a40a2e96b2e7b724b839db6aa57 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 28 Jun 2024 16:47:06 +0700
Subject: <iman> update mobile view

---
 src/lib/home/components/PromotionProgram.jsx | 29 ++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index c2779fd2..b204df8e 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -2,12 +2,12 @@ import Link from '@/core/components/elements/Link/Link'
 import Image from 'next/image'
 import { bannerApi } from '@/api/bannerApi';
 import useDevice from '@/core/hooks/useDevice'
-import { div } from 'lodash-contrib';
+import { Swiper, SwiperSlide } from 'swiper/react';
 const { useQuery } = require('react-query')
 const BannerSection = () => {
   const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' }));
   const { isMobile, isDesktop } = useDevice()
-  
+
   return (
     <div className='px-4 sm:px-0'>
       <div className='flex justify-between items-center mb-4 '>
@@ -19,7 +19,7 @@ const BannerSection = () => {
         // </Link>
         )}
       </div>
-      {promotionProgram.data &&
+      {isDesktop && (promotionProgram.data &&
     promotionProgram.data?.length > 0 && (
       <div className='grid grid-cols-3 sm:grid-cols-3 gap-4   rounded-md'>
         {promotionProgram.data?.map((banner) => (
@@ -36,7 +36,28 @@ const BannerSection = () => {
         ))}
       </div>
       
-    )}
+    ))}
+
+{isMobile && (
+     
+     <Swiper slidesPerView={1.1} spaceBetween={8} freeMode>
+     {promotionProgram.data?.map((banner) => (
+       <SwiperSlide key={banner.id}>
+         <Link key={banner.id} href={banner.url}>
+            <Image
+              width={439}
+              height={150}
+              quality={100}
+              src={banner.image}
+              alt={banner.name}
+              className='h-auto  w-full rounded '
+            />
+          </Link>
+       </SwiperSlide>
+     ))}
+   </Swiper>
+  
+  )}  
     </div>
     
   )
-- 
cgit v1.2.3


From 937013e8bf9f176c18a31d94205b9116d2a02224 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 16 Jul 2024 15:52:08 +0700
Subject: <iman> update button lihat semua mobile

---
 src/lib/home/components/PromotionProgram.jsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 66216d19..fabaf307 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -16,6 +16,11 @@ const BannerSection = () => {
           Lihat Semua
         </Link>
         )}
+        {isMobile && (
+          <Link href='/shop/promo' className='!text-red-500 font-semibold sm:text-h-sm'>
+          Lihat Semua
+        </Link>
+        )}
       </div>
       {promotionProgram.data &&
     promotionProgram.data?.length > 0 && (
-- 
cgit v1.2.3


From 617f920b5d60e989c08f8afd0e969d0d285b5a36 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 7 Aug 2024 09:36:36 +0700
Subject: <iman> add skeleton to banner promo homepage

---
 src/lib/home/components/PromotionProgram.jsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 99258d94..c2f76069 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -3,11 +3,16 @@ import Image from 'next/image'
 import { bannerApi } from '@/api/bannerApi';
 import useDevice from '@/core/hooks/useDevice'
 import { Swiper, SwiperSlide } from 'swiper/react';
+import  BannerPromoSkeleton from '../components/Skeleton/BannerPromoSkeleton';
 const { useQuery } = require('react-query')
 const BannerSection = () => {
   const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' }));
   const { isMobile, isDesktop } = useDevice()
 
+  if (promotionProgram.isLoading) {
+    return <BannerPromoSkeleton />;
+  }
+
   return (
     <div className='px-4 sm:px-0'>
       <div className='flex justify-between items-center mb-4 '>
-- 
cgit v1.2.3

