diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-28 15:20:02 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-28 15:20:02 +0700 |
| commit | ba46cdd517ccbab85b52f886d16e3161cab2f8c8 (patch) | |
| tree | c37066bdea0acd33e8dfa75f0b5a48778309a500 /src/core/components/elements/Navbar | |
| parent | d3a58c3ce7da23f29571d2c378af4984a8924dc2 (diff) | |
fix suggestion
Diffstat (limited to 'src/core/components/elements/Navbar')
| -rw-r--r-- | src/core/components/elements/Navbar/Search.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/components/elements/Navbar/Search.jsx b/src/core/components/elements/Navbar/Search.jsx index 3046782b..8c2ed8d4 100644 --- a/src/core/components/elements/Navbar/Search.jsx +++ b/src/core/components/elements/Navbar/Search.jsx @@ -13,6 +13,7 @@ const Search = () => { const loadSuggestion = useCallback(() => { if (query && document.activeElement == queryRef.current) { searchSuggestApi({ query }).then((response) => { + console.table(response.data.suggestions); setSuggestions(response.data.suggestions) }) } else { @@ -60,7 +61,7 @@ const Search = () => { <MagnifyingGlassIcon className='w-6' /> </button> - {suggestions.length > 1 && ( + {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) => ( |
