From b92cdabd62271553b5f86ce18c29764535b134c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 18 Jul 2022 21:10:05 +0200 Subject: [PATCH] Hide FeedSuggestions if empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/features/feed-suggestions/feed-suggestions.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/soapbox/features/feed-suggestions/feed-suggestions.tsx b/app/soapbox/features/feed-suggestions/feed-suggestions.tsx index 683e771b6..b888e80e3 100644 --- a/app/soapbox/features/feed-suggestions/feed-suggestions.tsx +++ b/app/soapbox/features/feed-suggestions/feed-suggestions.tsx @@ -60,6 +60,9 @@ const SuggestionItem = ({ accountId }: { accountId: string }) => { const FeedSuggestions = () => { const intl = useIntl(); const suggestedProfiles = useAppSelector((state) => state.suggestions.items); + const isLoading = useAppSelector((state) => state.suggestions.isLoading); + + if (!isLoading && suggestedProfiles.size === 0) return null; return (