From 3f849355048e5c280a35a5747577e5296b90e9fd Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 25 Jan 2024 15:27:27 +0700
Subject: Add all promo page

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 9bcd4df2..2605acbb 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -167,6 +167,14 @@ const NavbarDesktop = () => {
               </div>
             </button>
             <div className='w-6/12 flex px-1 divide-x divide-gray_r-6'>
+              <Link
+                href='/shop/promo'
+                className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
+                target='_blank'
+                rel='noreferrer'
+              >
+                Semua Promo
+              </Link>
               <Link
                 href='/shop/brands'
                 className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
@@ -189,15 +197,7 @@ const NavbarDesktop = () => {
                 target='_blank'
                 rel='noreferrer noopener'
               >
-                Blog Indoteknik
-              </Link>
-              <Link
-                href='/video'
-                className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
-                target='_blank'
-                rel='noreferrer'
-              >
-                Indoteknik TV
+                Blog
               </Link>
             </div>
 
-- 
cgit v1.2.3


From 1bb3f91f27db4db6a16a1ed3fe59016268ba3d44 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 8 May 2024 13:23:10 +0700
Subject: change wa number

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index d2f73d2d..308f2623 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -142,7 +142,7 @@ const NavbarDesktop = () => {
               />
               <div>
                 <div className='font-semibold'>Whatsapp</div>
-                0812 8080 622 (Chat)
+                0817 1718 1922 (Chat)
               </div>
             </a>
           </div>
-- 
cgit v1.2.3


From 138206777970e2a2659d4de0a1a9722038851a14 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 22 Jun 2024 12:40:16 +0700
Subject: <iman> update bagian navbar dan judul halaman all promotion

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 8cb4239c..e73a35ee 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -172,7 +172,10 @@ const NavbarDesktop = () => {
             <div className='w-6/12 flex px-1 divide-x divide-gray_r-6'>
               <Link
                 href='/shop/promo'
-                className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
+                className={`${
+                  router.asPath === '/shop/promo' && 'bg-gray_r-3'
+                } p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition`}
+                // className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
                 target='_blank'
                 rel='noreferrer'
               >
-- 
cgit v1.2.3


From c81465a639ae63e93f7f42e4c345e83db720bf68 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 15 Jul 2024 10:10:43 +0700
Subject: <iman> delete Indoteknik TV

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index e73a35ee..181eef0d 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -210,14 +210,14 @@ const NavbarDesktop = () => {
               >
                 Blog Indoteknik
               </Link>
-              <Link
+              {/* <Link
                 href='/video'
                 className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
                 target='_blank'
                 rel='noreferrer'
               >
                 Indoteknik TV
-              </Link>
+              </Link> */}
             </div>
 
             <div className='w-3/12 flex gap-x-1 relative'>
-- 
cgit v1.2.3


From 60060b517651e1122a638a3f592017879a0e9e63 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 17 Jul 2024 11:07:00 +0700
Subject: <iman> update all promotion

---
 .../components/elements/Navbar/NavbarDesktop.jsx   | 37 +++++++++++-----------
 1 file changed, 19 insertions(+), 18 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 181eef0d..66dc730c 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -170,45 +170,46 @@ const NavbarDesktop = () => {
               </div>
             </button>
             <div className='w-6/12 flex px-1 divide-x divide-gray_r-6'>
-              <Link
-                href='/shop/promo'
-                className={`${
-                  router.asPath === '/shop/promo' && 'bg-gray_r-3'
-                } p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition`}
-                // className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
-                target='_blank'
-                rel='noreferrer'
-              >
-                Semua Promo
-              </Link>
+            <Link
+              href="/shop/promo"
+              className={`${
+                router.asPath === '/shop/promo' && 'bg-gray_r-3'
+              } p-4 flex-1 flex justify-between items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group`}
+              target="_blank"
+              rel="noreferrer"
+            >
+              <p className="group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200">Semua Promo</p>
+              <p className="rounded bg-red-500 font-bold text-white text-[10px] w-auto inline-block p-[2px] rotate-12 -translate-y-2 group-hover:scale-105 transition-transform duration-200">NEW!</p>
+            </Link>
+
               <Link
                 href='/shop/brands'
-                className={`${
+                className={`${  
                   router.asPath === '/shop/brands' && 'bg-gray_r-3'
-                } p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition`}
+                } p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group`}
                 target='_blank'
                 rel='noreferrer'
               >
-                Semua Brand
+               <p className="group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200">Semua Brand</p>
               </Link>
               <Link
                 href='/shop/search?orderBy=stock'
                 className={`${
                   router.asPath === '/shop/search?orderBy=stock' &&
                   'bg-gray_r-3'
-                } p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition`}
+                } p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group`}
                 target='_blank'
                 rel='noreferrer'
               >
-                Ready Stock
+                <p className="group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200">Ready Stock</p>
               </Link>
               <Link
                 href='https://blog.indoteknik.com/'
-                className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition'
+                className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group'
                 target='_blank'
                 rel='noreferrer noopener'
               >
-                Blog Indoteknik
+                <p className="group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200">Blog Indoteknik</p>
               </Link>
               {/* <Link
                 href='/video'
-- 
cgit v1.2.3


From a42272ae50a5e8661db5ae534f08f475efb05665 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 17 Jul 2024 14:09:51 +0700
Subject: <iman> update all promotion

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 66dc730c..3fd6dfc3 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -19,6 +19,7 @@ import DesktopView from '../../views/DesktopView';
 import Link from '../Link/Link';
 import NavbarUserDropdown from './NavbarUserDropdown';
 import NextImage from 'next/image';
+import style from "./style/NavbarDesktop.module.css";
 
 const Search = dynamic(() => import('./Search'), { ssr: false });
 const TopBanner = dynamic(() => import('./TopBanner'), { ssr: false });
@@ -179,7 +180,7 @@ const NavbarDesktop = () => {
               rel="noreferrer"
             >
               <p className="group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200">Semua Promo</p>
-              <p className="rounded bg-red-500 font-bold text-white text-[10px] w-auto inline-block p-[2px] rotate-12 -translate-y-2 group-hover:scale-105 transition-transform duration-200">NEW!</p>
+              <p className={`rounded bg-red-500 font-bold text-white text-[10px] w-auto inline-block p-[2px] group-hover:scale-105 transition-transform duration-200 ${style.blink}`}>NEW!</p>
             </Link>
 
               <Link
-- 
cgit v1.2.3


From bc9dbc19c1ca8e8457c25df1f62dfbbfee0dcef3 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Mon, 22 Jul 2024 13:36:44 +0700
Subject: fitur layanan

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 308f2623..71bd7938 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -19,6 +19,7 @@ import DesktopView from '../../views/DesktopView';
 import Link from '../Link/Link';
 import NavbarUserDropdown from './NavbarUserDropdown';
 import NextImage from 'next/image';
+import { Button, Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react';
 
 const Search = dynamic(() => import('./Search'), { ssr: false });
 const TopBanner = dynamic(() => import('./TopBanner'), { ssr: false });
@@ -78,7 +79,16 @@ const NavbarDesktop = () => {
             </div>
           </div>
           <div className='flex gap-x-6'>
-            <Link href='/tentang-kami' className='!text-gray_r-12'>
+            <Menu>
+              <MenuButton rightIcon={<ChevronDownIcon />}>
+                Fitur Layanan
+              </MenuButton>
+              <MenuList zIndex={100}>
+                <MenuItem as='a' href='/tentang-kami'>Tentang Indoteknik</MenuItem>
+                <MenuItem as='a' href='/my/pembayaran-tempo'>Pembayaran Tempo</MenuItem>
+              </MenuList>
+            </Menu>
+            {/* <Link href='/tentang-kami' className='!text-gray_r-12'>
               Tentang Indoteknik.com
             </Link>
             <Link href='/my/pembayaran-tempo' className='!text-gray_r-12'>
@@ -86,7 +96,7 @@ const NavbarDesktop = () => {
             </Link>
             <Link href='/' className='!text-gray_r-12'>
               Fitur Layanan
-            </Link>
+            </Link> */}
           </div>
         </div>
       </div>
-- 
cgit v1.2.3


From 8451ecd350f8138925b6e1deba71733f038cd757 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 23 Jul 2024 10:26:48 +0700
Subject: <iman> update icon all promo navbar

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 3fd6dfc3..967b6f62 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -175,12 +175,18 @@ const NavbarDesktop = () => {
               href="/shop/promo"
               className={`${
                 router.asPath === '/shop/promo' && 'bg-gray_r-3'
-              } p-4 flex-1 flex justify-between items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group`}
+              }  flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group`}
               target="_blank"
               rel="noreferrer"
             >
               <p className="group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200">Semua Promo</p>
-              <p className={`rounded bg-red-500 font-bold text-white text-[10px] w-auto inline-block p-[2px] group-hover:scale-105 transition-transform duration-200 ${style.blink}`}>NEW!</p>
+                <Image
+                src='/images/ICON PROMO DISKON.svg'
+                alt='promo'
+                width={40}
+                height={40}
+                className={` inline-block group-hover:scale-105 transition-transform duration-200 ${style.blink}`}
+                />
             </Link>
 
               <Link
-- 
cgit v1.2.3


From d528fce32aca0c69ef61a5e7428215237d642eea Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 25 Jul 2024 09:13:51 +0700
Subject: <iman> upade icon navbar semua promo

---
 .../components/elements/Navbar/NavbarDesktop.jsx   | 36 ++++++++++++----------
 1 file changed, 20 insertions(+), 16 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 967b6f62..8a84f6e8 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -172,22 +172,26 @@ const NavbarDesktop = () => {
             </button>
             <div className='w-6/12 flex px-1 divide-x divide-gray_r-6'>
             <Link
-              href="/shop/promo"
-              className={`${
-                router.asPath === '/shop/promo' && 'bg-gray_r-3'
-              }  flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group`}
-              target="_blank"
-              rel="noreferrer"
-            >
-              <p className="group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200">Semua Promo</p>
-                <Image
-                src='/images/ICON PROMO DISKON.svg'
-                alt='promo'
-                width={40}
-                height={40}
-                className={` inline-block group-hover:scale-105 transition-transform duration-200 ${style.blink}`}
-                />
-            </Link>
+                href="/shop/promo"
+                className={`${
+                  router.asPath === '/shop/promo' && 'bg-gray_r-3'
+                }  flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition group relative`} // Added relative position
+                target="_blank"
+                rel="noreferrer"
+              >
+                <p className="absolute inset-0 flex justify-center items-center group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200 z-10">Semua Promo</p>
+                <div className='w-full h-full flex justify-end items-start'> 
+                  <Image
+                    src='/images/ICON PROMO DISKON.svg'
+                    alt='promo'
+                    width={100}
+                    height={100}
+                    quality={100}
+                    className={`inline-block  z-20`}
+                  />
+                </div>
+              </Link>
+
 
               <Link
                 href='/shop/brands'
-- 
cgit v1.2.3


From 426900db90d8db32cab20d2f0b04f2aedbcf864f Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Thu, 25 Jul 2024 10:35:24 +0700
Subject: feedback

---
 .../components/elements/Navbar/NavbarDesktop.jsx   | 37 ++++++++++++++++++----
 1 file changed, 30 insertions(+), 7 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 71bd7938..9de761a2 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -19,7 +19,14 @@ import DesktopView from '../../views/DesktopView';
 import Link from '../Link/Link';
 import NavbarUserDropdown from './NavbarUserDropdown';
 import NextImage from 'next/image';
-import { Button, Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react';
+import {
+  Button,
+  Menu,
+  MenuButton,
+  MenuItem,
+  MenuList,
+  useDisclosure,
+} from '@chakra-ui/react';
 
 const Search = dynamic(() => import('./Search'), { ssr: false });
 const TopBanner = dynamic(() => import('./TopBanner'), { ssr: false });
@@ -37,6 +44,7 @@ const NavbarDesktop = () => {
   const router = useRouter();
 
   const { product } = useProductContext();
+  const { isOpen, onOpen, onClose } = useDisclosure();
 
   useEffect(() => {
     if (router.pathname === '/shop/product/[slug]') {
@@ -79,13 +87,28 @@ const NavbarDesktop = () => {
             </div>
           </div>
           <div className='flex gap-x-6'>
-            <Menu>
-              <MenuButton rightIcon={<ChevronDownIcon />}>
-                Fitur Layanan
+            <Menu isOpen={isOpen}>
+              <MenuButton
+                rightIcon={<ChevronDownIcon />}
+                onMouseEnter={onOpen}
+                onMouseLeave={onClose}
+              >
+                <div className='flex gap-x-1'>
+                  <div>Fitur Layanan </div>
+                  <ChevronDownIcon className='w-5'/>
+                </div>
               </MenuButton>
-              <MenuList zIndex={100}>
-                <MenuItem as='a' href='/tentang-kami'>Tentang Indoteknik</MenuItem>
-                <MenuItem as='a' href='/my/pembayaran-tempo'>Pembayaran Tempo</MenuItem>
+              <MenuList
+                zIndex={100}
+                onMouseEnter={onOpen}
+                onMouseLeave={onClose}
+              >
+                <MenuItem as='a' href='/tentang-kami'>
+                  Tentang Indoteknik
+                </MenuItem>
+                <MenuItem as='a' href='/my/pembayaran-tempo'>
+                  Pembayaran Tempo
+                </MenuItem>
               </MenuList>
             </Menu>
             {/* <Link href='/tentang-kami' className='!text-gray_r-12'>
-- 
cgit v1.2.3


From 58a1dd973af0edef6961d217f1939d228bb8d787 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 1 Aug 2024 15:50:02 +0700
Subject: <iman> delete image promo

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 8a84f6e8..328bc0c9 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -180,7 +180,7 @@ const NavbarDesktop = () => {
                 rel="noreferrer"
               >
                 <p className="absolute inset-0 flex justify-center items-center group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200 z-10">Semua Promo</p>
-                <div className='w-full h-full flex justify-end items-start'> 
+                {/* <div className='w-full h-full flex justify-end items-start'> 
                   <Image
                     src='/images/ICON PROMO DISKON.svg'
                     alt='promo'
@@ -189,7 +189,7 @@ const NavbarDesktop = () => {
                     quality={100}
                     className={`inline-block  z-20`}
                   />
-                </div>
+                </div> */}
               </Link>
 
 
-- 
cgit v1.2.3


From f0558477dd96de88baea95415376ddd7b20050ae Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 8 Aug 2024 08:24:58 +0700
Subject: <iman> merge image promotion from all promo

---
 .../components/elements/Navbar/NavbarDesktop.jsx   | 76 ++++++++++++++++++----
 1 file changed, 64 insertions(+), 12 deletions(-)

(limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')

diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 7d9e4264..2ddf5efe 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -10,11 +10,12 @@ import {
   ChevronDownIcon,
   DocumentCheckIcon,
   HeartIcon,
+  ArrowUpRightIcon,
 } from '@heroicons/react/24/outline';
 import dynamic from 'next/dynamic';
 import Image from 'next/image';
 import { useRouter } from 'next/router';
-import { useEffect, useState } from 'react';
+import { useCallback, useEffect, useState } from 'react';
 import DesktopView from '../../views/DesktopView';
 import Link from '../Link/Link';
 import NavbarUserDropdown from './NavbarUserDropdown';
@@ -47,6 +48,46 @@ const NavbarDesktop = () => {
   const { product } = useProductContext();
   const { isOpen, onOpen, onClose } = useDisclosure();
 
+  const [showPopup, setShowPopup] = useState(false);
+  const [isTop, setIsTop] = useState(true);
+
+  const handleTopBannerLoad = useCallback(() => {
+    const showTimer = setTimeout(() => {
+      setShowPopup(true);
+    }, 500);
+
+    const hideTimer = setTimeout(() => {
+      // setShowPopup(false);
+    }, 9500);
+
+    return () => {
+      clearTimeout(showTimer);
+      clearTimeout(hideTimer);
+    };
+  }, []);
+
+  useEffect(() => {
+    const handleScroll = () => {
+      setIsTop(window.scrollY < 100);
+    };
+
+    window.addEventListener('scroll', handleScroll);
+    return () => {
+      window.removeEventListener('scroll', handleScroll);
+    };
+  }, []);
+
+  useEffect(() => {
+    const handleScroll = () => {
+      setIsTop(window.scrollY < 100);
+    };
+
+    window.addEventListener('scroll', handleScroll);
+    return () => {
+      window.removeEventListener('scroll', handleScroll);
+    };
+  }, []);
+
   useEffect(() => {
     if (router.pathname === '/shop/product/[slug]') {
       setPayloadWa({
@@ -79,7 +120,7 @@ const NavbarDesktop = () => {
 
   return (
     <DesktopView>
-      <TopBanner />
+      <TopBanner onLoad={handleTopBannerLoad} />
       <div className='py-2 bg-warning-400' id='desktop-nav-top'>
         <div className='container mx-auto flex justify-between'>
           <div className='flex items-start gap-5'>
@@ -204,6 +245,7 @@ const NavbarDesktop = () => {
               </div>
             </button>
             <div className='w-6/12 flex px-1 divide-x divide-gray_r-6'>
+            
             <Link
                 href="/shop/promo"
                 className={`${
@@ -212,19 +254,29 @@ const NavbarDesktop = () => {
                 target="_blank"
                 rel="noreferrer"
               >
-                <p className="absolute inset-0 flex justify-center items-center group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200 z-10">Semua Promo</p>
-                {/* <div className='w-full h-full flex justify-end items-start'> 
-                  <Image
-                    src='/images/ICON PROMO DISKON.svg'
-                    alt='promo'
-                    width={100}
-                    height={100}
+              {showPopup &&  (
+                <div className='w-full h-full relative justify-end items-start'> 
+                    <Image
+                    src='/images/penawaran-terbatas.jpg'
+                    alt='penawaran terbatas'
+                    width={1440}
+                    height={160}
                     quality={100}
-                    className={`inline-block  z-20`}
+                    // className={`fixed ${isTop ? 'md:top-[145px] lg:top-[160px] ' : 'lg:top-[85px] top-[80px]'} rounded-3xl md:left-1/4 lg:left-1/4 xl:left-1/4 left-2/3 w-40 h-12  p-2 z-50 transition-all duration-300 animate-pulse`}
+                    className={`inline-block relative -top-8 transition-all duration-300 z-20 animate-pulse`}
                   />
-                </div> */}
+                  </div>
+              )}
+                <p className="absolute inset-0 flex justify-center items-center group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200 z-10">Semua Promo</p>
               </Link>
-
+              {/* {showPopup && router.pathname === '/' && (
+                <div className={`fixed ${isTop ? 'top-[170px]' : 'top-[90px]'} rounded-3xl left-[700px] w-fit object-center bg-green-50 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20 text-center p-2 z-50 transition-all duration-300`}>
+                  <p className='w-36 h-3'>
+                    Penawaran Terbatas
+                    </p>
+                </div>
+              )} */}
+              
 
               <Link
                 href='/shop/brands'
-- 
cgit v1.2.3

