From ba46cdd517ccbab85b52f886d16e3161cab2f8c8 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 28 Apr 2023 15:20:02 +0700 Subject: fix suggestion --- src/core/components/elements/Navbar/Search.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/components') 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 = () => { - {suggestions.length > 1 && ( + {suggestions.length > 0 && ( <>
{suggestions.map((suggestion, index) => ( -- cgit v1.2.3