Skip to content

Commit

Permalink
fix: correction of error of link
Browse files Browse the repository at this point in the history
  • Loading branch information
LAU-MG committed Sep 4, 2024
1 parent 3188acc commit fa6d65b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/_components/page-content/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const components: Components = {
return <span {...props}>{children}</span>;
}

const target = href.includes('https') ? '_blank' : undefined;

return (
<Link href={href} passHref>
<a target={href.includes('https') ? '_blank' : undefined} {...props}>
{children}
</a>
<Link href={href} passHref target={target} rel={target ? 'noopener noreferrer' : undefined}>
{children}
</Link>
);
}
Expand Down

0 comments on commit fa6d65b

Please sign in to comment.