From 2e7b5789f013c121b48edcb3589d094a2b636c59 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 25 Sep 2024 09:14:54 +0700
Subject: <iman> back to code

---
 src/core/components/elements/Navbar/NavbarDesktop.jsx | 12 ++++--------
 1 file changed, 4 insertions(+), 8 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 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`}
                     />
-- 
cgit v1.2.3

