From c612759cbe5e84e367eba0dc53ea32fea808a871 Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Tue, 11 Feb 2025 09:36:29 +0100 Subject: [PATCH] Remove text for non-new species (#2658) * Do not show labels for non-new species or organisms * Show activity indicator while top suggestion loading --- .../AdditionalSuggestionsScroll.js | 6 +++--- src/components/Match/Match.js | 18 +++++++++++++----- src/components/Match/MatchContainer.js | 4 ++-- src/components/Match/MatchHeader.js | 12 ------------ src/i18n/l10n/en.ftl | 6 ------ src/i18n/l10n/en.ftl.json | 6 ------ src/i18n/strings.ftl | 6 ------ 7 files changed, 18 insertions(+), 40 deletions(-) diff --git a/src/components/Match/AdditionalSuggestions/AdditionalSuggestionsScroll.js b/src/components/Match/AdditionalSuggestions/AdditionalSuggestionsScroll.js index 6d3caeff1..e2651d16c 100644 --- a/src/components/Match/AdditionalSuggestions/AdditionalSuggestionsScroll.js +++ b/src/components/Match/AdditionalSuggestions/AdditionalSuggestionsScroll.js @@ -8,7 +8,7 @@ import SuggestionsResult from "./SuggestionsResult"; const AdditionalSuggestionsScroll = ( { otherSuggestions, - otherSuggestionsLoading, + suggestionsLoading, onSuggestionChosen } ) => { const { t } = useTranslation( ); @@ -41,7 +41,7 @@ const AdditionalSuggestionsScroll = ( { ); }; - if ( !otherSuggestionsLoading && otherSuggestions?.length === 0 ) { + if ( !suggestionsLoading && otherSuggestions?.length === 0 ) { return null; } @@ -50,7 +50,7 @@ const AdditionalSuggestionsScroll = ( { return ( {t( "It-might-also-be" )} - {!otherSuggestionsLoading + {!suggestionsLoading ? ( void, topSuggestion: Object, otherSuggestions: Array, - otherSuggestionsLoading: boolean, + suggestionsLoading: boolean, onSuggestionChosen: ( ) => void } @@ -36,7 +38,7 @@ const Match = ( { handleLocationPickerPressed, topSuggestion, otherSuggestions, - otherSuggestionsLoading, + suggestionsLoading, onSuggestionChosen }: Props ) => { const { t } = useTranslation( ); @@ -50,7 +52,13 @@ const Match = ( { - + { + suggestionsLoading + ? ( + + ) + : + } {!latitude && (