From 16fed2e7d00252f5df3f9b5bdf0a5a2b2a094f76 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 8 Aug 2023 10:39:34 +0700
Subject: Improve home page performance

---
 src/core/components/elements/Navbar/Search.jsx | 30 +++++++++++++-------------
 1 file changed, 15 insertions(+), 15 deletions(-)

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

diff --git a/src/core/components/elements/Navbar/Search.jsx b/src/core/components/elements/Navbar/Search.jsx
index 47a9c235..f4a8ab3a 100644
--- a/src/core/components/elements/Navbar/Search.jsx
+++ b/src/core/components/elements/Navbar/Search.jsx
@@ -64,21 +64,21 @@ const Search = () => {
           <MagnifyingGlassIcon className='w-6' />
         </button>
 
-        {suggestions.length > 0 && (
-          <>
-            <div className='absolute w-full top-[50px] rounded-b bg-gray_r-1 border border-gray_r-6 divide-y divide-gray_r-6 z-50'>
-              {suggestions.map((suggestion, index) => (
-                <Link
-                  href={`/shop/search?q=${suggestion.term}`}
-                  key={index}
-                  className='px-3 py-3 !text-gray_r-12 font-normal'
-                >
-                  {suggestion.term}
-                </Link>
-              ))}
-            </div>
-          </>
-        )}
+        <div
+          className={`absolute w-full top-[50px] rounded-b bg-gray_r-1 border border-gray_r-6 divide-y divide-gray_r-6 z-50 ${
+            suggestions.length > 0 ? 'block' : 'hidden'
+          }`}
+        >
+          {suggestions.map((suggestion, index) => (
+            <Link
+              href={`/shop/search?q=${suggestion.term}`}
+              key={index}
+              className='px-3 py-3 !text-gray_r-12 font-normal'
+            >
+              {suggestion.term}
+            </Link>
+          ))}
+        </div>
       </form>
     </>
   )
-- 
cgit v1.2.3

