Skip to content

Commit

Permalink
fix(lint): apply noreferrer to the external links
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Aug 28, 2024
1 parent 02b36ac commit 72995bd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/lib/fields/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ const viewComponent = ({value, title}: {value: string; title: string}) => {
return (
<div className="mb-4">
<div className="mb-4 font-bold block">{title}</div>
<a href={target} className="bg-gray-300 p-2 rounded" target="_blank">
<a
href={target}
className="bg-gray-300 p-2 rounded"
target="_blank"
rel="noreferrer"
>
{linkTitle} 📤
</a>
</div>
Expand All @@ -51,7 +56,12 @@ const listComponent = ({value}: {value: string; title: string}) => {
const {title: linkTitle, target} = JSON.parse(value)

return (
<a href={target} className="bg-gray-300 p-2 rounded" target="_blank">
<a
href={target}
className="bg-gray-300 p-2 rounded"
target="_blank"
rel="noreferrer"
>
{linkTitle} 📤
</a>
)
Expand Down

0 comments on commit 72995bd

Please sign in to comment.