diff --git a/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx b/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx index 027882d21..b8ef40ccc 100644 --- a/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx +++ b/app/soapbox/features/onboarding/steps/suggested-accounts-step.tsx @@ -19,9 +19,39 @@ const SuggestedAccountsStep = ({ onNext }: { onNext: () => void }) => { dispatch(fetchSuggestions()); }, []); - if (suggestionsToRender.isEmpty()) { - return null; - } + const renderSuggestions = () => { + return ( +
+ {suggestionsToRender.map((suggestion: ImmutableMap) => ( +
+ , but it isn't + id={suggestion.get('account')} + showProfileHoverCard={false} + /> +
+ ))} +
+ ); + }; + + const renderEmpty = () => { + return ( +
+ + + +
+ ); + }; + + const renderBody = () => { + if (suggestionsToRender.isEmpty()) { + return renderEmpty(); + } else { + return renderSuggestions(); + } + }; return ( @@ -39,17 +69,7 @@ const SuggestedAccountsStep = ({ onNext }: { onNext: () => void }) => { -
- {suggestionsToRender.map((suggestion: ImmutableMap) => ( -
- , but it isn't - id={suggestion.get('account')} - showProfileHoverCard={false} - /> -
- ))} -
+ {renderBody()}