From 0e37c090427face4cb8c777883dc15ec9a5f66df Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 12 Aug 2024 14:44:07 +0100 Subject: [PATCH] Show spinner whilst initial search request is in progress (#12883) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/rooms/RoomSearchAuxPanel.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/views/rooms/RoomSearchAuxPanel.tsx b/src/components/views/rooms/RoomSearchAuxPanel.tsx index 0882c4a8bf..1461b12a42 100644 --- a/src/components/views/rooms/RoomSearchAuxPanel.tsx +++ b/src/components/views/rooms/RoomSearchAuxPanel.tsx @@ -23,6 +23,7 @@ import { _t } from "../../../languageHandler"; import { PosthogScreenTracker } from "../../../PosthogTrackers"; import SearchWarning, { WarningKind } from "../elements/SearchWarning"; import { SearchInfo, SearchScope } from "../../../Searching"; +import InlineSpinner from "../elements/InlineSpinner"; interface Props { searchInfo?: SearchInfo; @@ -41,13 +42,15 @@ const RoomSearchAuxPanel: React.FC = ({ searchInfo, isRoomEncrypted, onSe
- {searchInfo - ? _t( - "room|search|summary", - { count: searchInfo.count ?? 0 }, - { query: () => {searchInfo.term} }, - ) - : undefined} + {searchInfo?.count !== undefined ? ( + _t( + "room|search|summary", + { count: searchInfo.count }, + { query: () => {searchInfo.term} }, + ) + ) : ( + + )}