From 8bb683d2c695f0df292f6a7965efcbf3abd72a3d Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 13 Sep 2023 11:04:52 +0700
Subject: Add lazy load on stock product

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

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

diff --git a/src/core/components/elements/Navbar/TopBanner.jsx b/src/core/components/elements/Navbar/TopBanner.jsx
index dca2e930..a757c260 100644
--- a/src/core/components/elements/Navbar/TopBanner.jsx
+++ b/src/core/components/elements/Navbar/TopBanner.jsx
@@ -6,7 +6,7 @@ import { TopBannerSkeleton } from '../Skeleton/TopBannerSkeleton'
 
 const TopBanner = () => {
   const fetchTopBanner = async () => await odooApi('GET', '/api/v1/banner?type=top-banner')
-  const topBanner = useQuery('topBanner', fetchTopBanner)
+  const topBanner = useQuery('topBanner', fetchTopBanner, { refetchOnWindowFocus: false })
 
   if (topBanner.isLoading) {
     return <TopBannerSkeleton />
-- 
cgit v1.2.3

