mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-20 04:16:21 +02:00
Add correct rel values to anchored links
This commit is contained in:
parent
f30505e1f8
commit
f206d31083
1 changed files with 5 additions and 2 deletions
|
@ -10,9 +10,10 @@ export const truncateLink = (href: string, text: string, key: number) => {
|
|||
if (beginningOfPath !== -1) {
|
||||
finalText = textWithoutProtocol.substring(0, beginningOfPath + 15);
|
||||
}
|
||||
|
||||
if (finalText.length === textWithoutProtocol.length) {
|
||||
return (
|
||||
<a key={key} href={href}>
|
||||
<a key={key} href={href} rel="nofollow noreferrer">
|
||||
{finalText}
|
||||
</a>
|
||||
);
|
||||
|
@ -25,7 +26,9 @@ export const truncateLink = (href: string, text: string, key: number) => {
|
|||
<div className="max-w-md break-all font-mono text-xs">{href}</div>
|
||||
}
|
||||
>
|
||||
<a href={href}>{finalText}</a>
|
||||
<a href={href} rel="nofollow noreferrer">
|
||||
{finalText}
|
||||
</a>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue