From 7fa66481b3e6ef0ec952c27d91ee1036e2ae5d23 Mon Sep 17 00:00:00 2001 From: Andreea-Lupu Date: Mon, 11 Dec 2023 10:24:24 +0200 Subject: [PATCH] fix: show a loading message while waiting for a response Signed-off-by: Andreea-Lupu --- src/components/Header/SearchSuggestion.jsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/Header/SearchSuggestion.jsx b/src/components/Header/SearchSuggestion.jsx index 88abac5b..fcb7bf27 100644 --- a/src/components/Header/SearchSuggestion.jsx +++ b/src/components/Header/SearchSuggestion.jsx @@ -295,12 +295,27 @@ function SearchSuggestion({ setSearchCurrentValue = () => {} }) { {isOpen && suggestionData?.length > 0 && renderSuggestions()} + {isOpen && isLoading && !isEmpty(searchQuery) && isEmpty(suggestionData) && ( + <> + {}} + > + + Loading... + + + + )} {isOpen && isEmpty(searchQuery) && isEmpty(suggestionData) && ( <>