mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-06 00:52:42 +00:00
doesn't need key inside component
This commit is contained in:
parent
11fe92a5c6
commit
cc77bb5029
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user