Merge branch 'feed-suggestions-hide-empty' into 'develop'

Hide FeedSuggestions if empty

See merge request soapbox-pub/soapbox-fe!1647
This commit is contained in:
marcin mikołajczak 2022-07-18 19:56:15 +00:00
commit 547bb0a9e9

View file

@ -60,6 +60,9 @@ const SuggestionItem = ({ accountId }: { accountId: string }) => {
const FeedSuggestions = () => { const FeedSuggestions = () => {
const intl = useIntl(); const intl = useIntl();
const suggestedProfiles = useAppSelector((state) => state.suggestions.items); const suggestedProfiles = useAppSelector((state) => state.suggestions.items);
const isLoading = useAppSelector((state) => state.suggestions.isLoading);
if (!isLoading && suggestedProfiles.size === 0) return null;
return ( return (
<Card size='lg' variant='rounded'> <Card size='lg' variant='rounded'>