From 96e59b7af6895f82ac005d60b65084bd5ec2d01f Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Thu, 31 Aug 2023 16:47:34 +0700
Subject: change ui open newtab, g maps, top banner, profil

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 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 acd2d1ee..81ec6d0e 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -97,13 +97,13 @@ const NavbarDesktop = () => {
             <Search />
           </div>
           <div className='flex gap-x-4'>
-            <Link href='/my/transactions' className='flex items-center gap-x-2 !text-gray_r-12/80'>
+            <Link href='/my/transactions' target='_blank' rel='noreferrer' className='flex items-center gap-x-2 !text-gray_r-12/80'>
               <DocumentCheckIcon className='w-7' />
               Daftar
               <br />
               Quotation
             </Link>
-            <Link href='/shop/cart' className='flex items-center gap-x-2 !text-gray_r-12/80'>
+            <Link href='/shop/cart' target='_blank' rel='noreferrer' className='flex items-center gap-x-2 !text-gray_r-12/80'>
               <div className={`relative ${cartCount > 0 && 'mr-2'}`}>
                 <ShoppingCartIcon className='w-7' />
                 {cartCount > 0 && (
@@ -118,7 +118,7 @@ const NavbarDesktop = () => {
                 Belanja
               </span>
             </Link>
-            <Link href='/my/wishlist' className='flex items-center gap-x-2 !text-gray_r-12/80'>
+            <Link target='_blank' rel='noreferrer' href='/my/wishlist' className='flex items-center gap-x-2 !text-gray_r-12/80'>
               <HeartIcon className='w-7' />
               Wishlist
             </Link>
@@ -155,12 +155,14 @@ const NavbarDesktop = () => {
               <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'
+                target='_blank' rel='noreferrer'
               >
                 Semua Brand
               </Link>
               <Link
                 href='/shop/search?orderBy=stock'
                 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'
               >
                 Ready Stock
               </Link>
@@ -175,6 +177,7 @@ const NavbarDesktop = () => {
               <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>
-- 
cgit v1.2.3


From bca256dfc413400a6c17ca189a8f31a15d82473a Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Sat, 2 Sep 2023 10:36:41 +0700
Subject: button wa jika sudah login redirect ke halaman sebelumnya

---
 .../components/elements/Navbar/NavbarDesktop.jsx   | 35 +++++++++++++++++-----
 1 file changed, 28 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 81ec6d0e..0aa9febf 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -34,6 +34,7 @@ const NavbarDesktop = () => {
 
   const [templateWA, setTemplateWA] = useState(null)
   const [payloadWA, setPayloadWa] = useState(null)
+  const [urlPath, setUrlPath] = useState(null)
 
   const router = useRouter()
 
@@ -62,6 +63,8 @@ const NavbarDesktop = () => {
       }
       getProduct()
       setTemplateWA('product')
+
+      setUrlPath(router.asPath)
     }
 
     return () => {
@@ -97,13 +100,23 @@ const NavbarDesktop = () => {
             <Search />
           </div>
           <div className='flex gap-x-4'>
-            <Link href='/my/transactions' target='_blank' rel='noreferrer' className='flex items-center gap-x-2 !text-gray_r-12/80'>
+            <Link
+              href='/my/transactions'
+              target='_blank'
+              rel='noreferrer'
+              className='flex items-center gap-x-2 !text-gray_r-12/80'
+            >
               <DocumentCheckIcon className='w-7' />
               Daftar
               <br />
               Quotation
             </Link>
-            <Link href='/shop/cart' target='_blank' rel='noreferrer' className='flex items-center gap-x-2 !text-gray_r-12/80'>
+            <Link
+              href='/shop/cart'
+              target='_blank'
+              rel='noreferrer'
+              className='flex items-center gap-x-2 !text-gray_r-12/80'
+            >
               <div className={`relative ${cartCount > 0 && 'mr-2'}`}>
                 <ShoppingCartIcon className='w-7' />
                 {cartCount > 0 && (
@@ -118,12 +131,17 @@ const NavbarDesktop = () => {
                 Belanja
               </span>
             </Link>
-            <Link target='_blank' rel='noreferrer' href='/my/wishlist' className='flex items-center gap-x-2 !text-gray_r-12/80'>
+            <Link
+              target='_blank'
+              rel='noreferrer'
+              href='/my/wishlist'
+              className='flex items-center gap-x-2 !text-gray_r-12/80'
+            >
               <HeartIcon className='w-7' />
               Wishlist
             </Link>
             <a
-              href={whatsappUrl(templateWA, payloadWA)}
+              href={whatsappUrl(templateWA, payloadWA, urlPath)}
               target='_blank'
               rel='noreferrer'
               className='flex items-center gap-x-1 !text-gray_r-12/80'
@@ -155,14 +173,16 @@ const NavbarDesktop = () => {
               <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'
-                target='_blank' rel='noreferrer'
+                target='_blank'
+                rel='noreferrer'
               >
                 Semua Brand
               </Link>
               <Link
                 href='/shop/search?orderBy=stock'
                 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'
+                target='_blank'
+                rel='noreferrer'
               >
                 Ready Stock
               </Link>
@@ -177,7 +197,8 @@ const NavbarDesktop = () => {
               <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'
+                target='_blank'
+                rel='noreferrer'
               >
                 Indoteknik TV
               </Link>
-- 
cgit v1.2.3

