From bdf2630e9051addddfd09563ac0ee76dd4f4f345 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 10 Nov 2026 04:04:15 +0100 Subject: [PATCH] Add rel="me" to profile links on web (#12235) --- src/components/Link.tsx | 7 ++++++- src/features/profileLinks/components/LinkPill.tsx | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) 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} ) -- knotmirror 0.0.1