diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-09 10:47:44 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-09 10:47:44 +0700 |
| commit | 407af81fb2d9ebdf3415fe7b34d08996ed7c80ec (patch) | |
| tree | 675d0981a6259b814c3deb7bd053a85892fea53b /src/core/components/elements/Navbar/Search.jsx | |
| parent | 9595223471946520f5c156e24eceb577fae4c901 (diff) | |
| parent | 863047e92834479ce8edb576b57b129c611821a8 (diff) | |
Merge branch 'master' into CR/flash_sale
# Conflicts:
# src/lib/product/components/ProductCard.jsx
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> </> ) |
