Add 'key' to Link to fix react console error

This commit is contained in:
Chewbacca 2023-01-25 10:06:03 -05:00 committed by Alex Gleason
parent 3dd4efdc14
commit 44fce6fbf3
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -50,7 +50,14 @@ const StatusReplyMentions: React.FC<IStatusReplyMentions> = ({ status, hoverable
// The typical case with a reply-to and a list of mentions.
const accounts = to.slice(0, 2).map(account => {
const link = (
<Link to={`/@${account.acct}`} className='reply-mentions__account' onClick={(e) => e.stopPropagation()}>@{account.username}</Link>
<Link
key={account.id}
to={`/@${account.acct}`}
className='reply-mentions__account'
onClick={(e) => e.stopPropagation()}
>
@{account.username}
</Link>
);
if (hoverable) {