diff --git a/src/components/Link.tsx b/src/components/Link.tsx index 1b3fb375b..2df28a5c9 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -305,6 +305,10 @@ export type LinkProps = Omit & * Forwarded to the underlying `Button`, e.g. for a roving focus target. */ ref?: React.Ref> + /** + * Web-only attribute. Overrides the default `rel` attr on web. + */ + rel?: string } /** @@ -325,6 +329,7 @@ export function Link({ shouldProxy, overridePresentation, peek, + rel, ...rest }: LinkProps) { const {href, isExternal, onPress, onLongPress, openExternally} = useLink({ @@ -356,7 +361,7 @@ export function Link({ {...web({ hrefAttrs: { target: download ? undefined : isExternal ? 'blank' : undefined, - rel: isExternal ? 'noopener noreferrer' : undefined, + rel: rel ?? (isExternal ? 'noopener noreferrer' : undefined), download, }, dataSet: { diff --git a/src/features/profileLinks/components/LinkPill.tsx b/src/features/profileLinks/components/LinkPill.tsx index 80d02cca5..d5d6d27f7 100644 --- a/src/features/profileLinks/components/LinkPill.tsx +++ b/src/features/profileLinks/components/LinkPill.tsx @@ -128,7 +128,12 @@ export function ProfileLinkPill({ if (opensLink) { return ( - + {content} )