diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-21 14:50:39 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-21 14:50:39 +0700 |
| commit | 8c726c1669289eab7e6a6989084d7de036063f29 (patch) | |
| tree | a1dfd146b30b21c9fe5e45211ac07057c056b65d /src/core/components/elements/Navbar/Search.jsx | |
| parent | 199bd2f875391f3e0010bccba7748639a28d36f2 (diff) | |
| parent | 28a598a7b0367aa3db14acf5dd700d6264a9f5cc (diff) | |
Merge branch 'master' into development
Diffstat (limited to 'src/core/components/elements/Navbar/Search.jsx')
| -rw-r--r-- | src/core/components/elements/Navbar/Search.jsx | 30 |
1 files changed, 15 insertions, 15 deletions
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> </> ) |
