doesn't need key inside component

This commit is contained in:
ChaosExAnima 2025-10-02 17:15:56 +02:00
parent 11fe92a5c6
commit cc77bb5029
No known key found for this signature in database
GPG Key ID: 8F2B333100FB6117

View File

@ -14,7 +14,6 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
text, text,
hashtagAccountId, hashtagAccountId,
mentionAccountId, mentionAccountId,
key,
...props ...props
}) => { }) => {
// Handle hashtags // Handle hashtags
@ -27,7 +26,6 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
to={`/tags/${hashtag}`} to={`/tags/${hashtag}`}
rel='tag' rel='tag'
data-menu-hashtag={hashtagAccountId} data-menu-hashtag={hashtagAccountId}
key={key}
> >
#<span>{hashtag}</span> #<span>{hashtag}</span>
</Link> </Link>
@ -42,7 +40,6 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
to={`/@${mention}`} to={`/@${mention}`}
title={`@${mention}`} title={`@${mention}`}
data-hover-card-account={mentionAccountId} data-hover-card-account={mentionAccountId}
key={key}
> >
@<span>{mention}</span> @<span>{mention}</span>
</Link> </Link>
@ -52,7 +49,7 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
// Non-absolute paths treated as internal links. // Non-absolute paths treated as internal links.
if (href.startsWith('/')) { if (href.startsWith('/')) {
return ( return (
<Link {...props} className='unhandled-link' to={href} key={key}> <Link {...props} className='unhandled-link' to={href}>
{text} {text}
</Link> </Link>
); );
@ -70,7 +67,6 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
target='_blank' target='_blank'
rel='noreferrer noopener' rel='noreferrer noopener'
translate='no' translate='no'
key={key}
> >
<span className='invisible'>{url.protocol + '//'}</span> <span className='invisible'>{url.protocol + '//'}</span>
<span className='ellipsis'>{`${url.hostname}/${first ?? ''}`}</span> <span className='ellipsis'>{`${url.hostname}/${first ?? ''}`}</span>