add ref_src (#3532)

This commit is contained in:
Samuel Newman
2024-04-13 12:44:37 +01:00
committed by GitHub
parent 9fb20915e8
commit 4c95ec2ec4
3 changed files with 13 additions and 4 deletions
+6 -1
View File
@@ -8,9 +8,14 @@ export function Link({
href: string
className?: string
} & h.JSX.HTMLAttributes<HTMLAnchorElement>) {
const newSearchParam = new URLSearchParams()
newSearchParam.set('ref_src', 'embed')
return (
<a
href={href.startsWith('http') ? href : `https://bsky.app${href}`}
href={`${
href.startsWith('http') ? href : `https://bsky.app${href}`
}?${newSearchParam.toString()}`}
target="_blank"
rel="noopener noreferrer nofollow"
onClick={evt => evt.stopPropagation()}