From bca256dfc413400a6c17ca189a8f31a15d82473a Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" 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') 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 = () => {
- + Daftar
Quotation - +
0 && 'mr-2'}`}> {cartCount > 0 && ( @@ -118,12 +131,17 @@ const NavbarDesktop = () => { Belanja - + Wishlist { Semua Brand Ready Stock @@ -177,7 +197,8 @@ const NavbarDesktop = () => { Indoteknik TV -- cgit v1.2.3