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 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

