kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
ProfileFamiliarFollowers: add `key` prop, fix console error
rodzic
c242f8e9c7
commit
b787b4cca7
|
@ -44,7 +44,7 @@ const ProfileFamiliarFollowers: React.FC<IProfileFamiliarFollowers> = ({ account
|
||||||
}
|
}
|
||||||
|
|
||||||
const accounts: Array<React.ReactNode> = familiarFollowers.map(account => !!account && (
|
const accounts: Array<React.ReactNode> = familiarFollowers.map(account => !!account && (
|
||||||
<HoverRefWrapper accountId={account.id} inline>
|
<HoverRefWrapper accountId={account.id} key={account.id} inline>
|
||||||
<Link className='mention inline-block' to={`/@${account.acct}`}>
|
<Link className='mention inline-block' to={`/@${account.acct}`}>
|
||||||
<HStack space={1} alignItems='center' grow>
|
<HStack space={1} alignItems='center' grow>
|
||||||
<Text
|
<Text
|
||||||
|
@ -53,17 +53,16 @@ const ProfileFamiliarFollowers: React.FC<IProfileFamiliarFollowers> = ({ account
|
||||||
truncate
|
truncate
|
||||||
dangerouslySetInnerHTML={{ __html: account.display_name_html }}
|
dangerouslySetInnerHTML={{ __html: account.display_name_html }}
|
||||||
/>
|
/>
|
||||||
{/* <span dangerouslySetInnerHTML={{ __html: account.display_name_html }} /> */}
|
|
||||||
|
|
||||||
{account.verified && <VerificationBadge />}
|
{account.verified && <VerificationBadge />}
|
||||||
</HStack>
|
</HStack>
|
||||||
</Link>
|
</Link>
|
||||||
</HoverRefWrapper>
|
</HoverRefWrapper>
|
||||||
)).toArray();
|
)).toArray().filter(Boolean);
|
||||||
|
|
||||||
if (familiarFollowerIds.size > 2) {
|
if (familiarFollowerIds.size > 2) {
|
||||||
accounts.push(
|
accounts.push(
|
||||||
<span className='cursor-pointer hover:underline' role='presentation' onClick={openFamiliarFollowersModal}>
|
<span key='_' className='cursor-pointer hover:underline' role='presentation' onClick={openFamiliarFollowersModal}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.familiar_followers.more'
|
id='account.familiar_followers.more'
|
||||||
defaultMessage='{count, plural, one {# other} other {# others}} you follow'
|
defaultMessage='{count, plural, one {# other} other {# others}} you follow'
|
||||||
|
|
Ładowanie…
Reference in New Issue