From 91086d8b1af2e1c0ca9db38d037f6331c9e6131a Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 19 Jan 2024 09:30:15 +0700
Subject: Hide brand on ready stock page

---
 src/lib/product/components/ProductSearch.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/lib/product/components/ProductSearch.jsx')

diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index e2b961f1..ed4365a8 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -253,12 +253,14 @@ const ProductSearch = ({
     router.push(`${prefixUrl}?${params}`);
   };
 
+  const isNotReadyStockPage = router.asPath !== '/shop/search?orderBy=stock';
+
   return (
     <>
       <MobileView>
         {productSearch.isLoading && <ProductSearchSkeleton />}
         <div className='p-4 pt-0'>
-          {isBrand && isBrand.logo && (
+          {isNotReadyStockPage && isBrand && isBrand.logo && (
             <div className='mb-3'>
               <h1 className='mb-2 font-semibold text-h-sm'>
                 Brand Pencarian {q}
@@ -403,7 +405,7 @@ const ProductSearch = ({
               </div>
             )}
 
-            {isBrand && isBrand.logo && (
+            {isNotReadyStockPage && isBrand && isBrand.logo && (
               <div className='mb-3'>
                 <h1 className='text-2xl mb-2 font-semibold'>
                   Brand Pencarian {q}
-- 
cgit v1.2.3

