pl-fe: fix who to follow panel

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-13 14:51:41 +02:00
parent b24be14d55
commit f56e300c81

View file

@ -31,7 +31,7 @@ const WhoToFollowPanel = ({ limit }: IWhoToFollowPanel) => {
dismissSuggestion.mutate(account.id); dismissSuggestion.mutate(account.id);
}; };
if (!isFetching && !suggestions.length) { if (!isFetching && !suggestionsToRender.length) {
return null; return null;
} }
@ -51,9 +51,8 @@ const WhoToFollowPanel = ({ limit }: IWhoToFollowPanel) => {
) : ( ) : (
suggestionsToRender.map((suggestion: any) => ( suggestionsToRender.map((suggestion: any) => (
<AccountContainer <AccountContainer
key={suggestion.account} key={suggestion.account_id}
// @ts-ignore: TS thinks `id` is passed to <Account>, but it isn't id={suggestion.account_id}
id={suggestion.account}
actionIcon={require('@tabler/icons/outline/x.svg')} actionIcon={require('@tabler/icons/outline/x.svg')}
actionTitle={intl.formatMessage(messages.dismissSuggestion)} actionTitle={intl.formatMessage(messages.dismissSuggestion)}
onActionClick={features.suggestionsDismiss ? handleDismiss : undefined} onActionClick={features.suggestionsDismiss ? handleDismiss : undefined}