diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-25 09:14:54 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-25 09:14:54 +0700 |
| commit | 2e7b5789f013c121b48edcb3589d094a2b636c59 (patch) | |
| tree | e2e0946898062de87340ae7d2e7974a8f4e7993f /src/core | |
| parent | ad952b397b1cebcf85b66877da8e949e7e7a891f (diff) | |
<iman> back to code
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/components/elements/Navbar/NavbarDesktop.jsx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx index d480aa8d..eebfbcd5 100644 --- a/src/core/components/elements/Navbar/NavbarDesktop.jsx +++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx @@ -57,12 +57,8 @@ const NavbarDesktop = () => { context: 'quotation', site: auth?.webRole === null && auth?.site ? auth.site : null, }; - let transactions = null; - - if (auth) { - transactions = useTransactions({ query }); - } + const { transactions } = useTransactions({ query }); const data = transactions?.data?.saleOrders.filter( (transaction) => transaction.status === 'draft' ); @@ -109,7 +105,7 @@ const NavbarDesktop = () => { useEffect(() => { setPendingTransactions(data); - }, [transactions?.data]); + }, [transactions.data]); useEffect(() => { if (router.pathname === '/shop/product/[slug]') { @@ -139,7 +135,7 @@ const NavbarDesktop = () => { return () => { window.removeEventListener('localStorageChange', handleCartChange); }; - }, [transactions?.data, cart]); + }, [transactions.data, cart]); useEffect(() => { const handleQuotationChange = () => { @@ -291,7 +287,7 @@ const NavbarDesktop = () => { alt='penawaran terbatas' width={1440} height={160} - quality={85} + quality={100} // 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`} /> |
