From a9b3265d1255472b9ed08c7147bf19c9389727a9 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Fri, 8 Jul 2022 10:58:56 +0200 Subject: [PATCH] Added loader for indexing refs https://github.com/TryGhost/Team/issues/1665 - adds loading indicator while search index is setup from site data --- ghost/sodo-search/src/components/PopupModal.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ghost/sodo-search/src/components/PopupModal.js b/ghost/sodo-search/src/components/PopupModal.js index 2c62a4a9b1..35e33373d4 100644 --- a/ghost/sodo-search/src/components/PopupModal.js +++ b/ghost/sodo-search/src/components/PopupModal.js @@ -148,9 +148,13 @@ function SearchClearIcon() { } function Loading() { - return ( - - ); + const {indexComplete} = useContext(AppContext); + if (!indexComplete) { + return ( + + ); + } + return null; } function CancelButton() {