From 4e658d52497ea26ddd4228d7fe88b579509a22cb 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 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/Header/SearchSuggestion.jsx b/src/components/Header/SearchSuggestion.jsx index 88abac5b..0bf2f97f 100644 --- a/src/components/Header/SearchSuggestion.jsx +++ b/src/components/Header/SearchSuggestion.jsx @@ -295,12 +295,26 @@ function SearchSuggestion({ setSearchCurrentValue = () => {} }) { {isOpen && suggestionData?.length > 0 && renderSuggestions()} + {isOpen && isLoading && !isEmpty(searchQuery) && isEmpty(suggestionData) && ( + <> + + + Loading... + + + + )} {isOpen && isEmpty(searchQuery) && isEmpty(suggestionData) && ( <>