diff --git a/src/components/Link.tsx b/src/components/Link.tsx index 335ea0bced..1720e430da 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -236,12 +236,12 @@ export function Link({ ) } -export type InlineLinkProps = React.PropsWithChildren< - BaseLinkProps & TextStyleProp & Pick -> & +export type InlineLinkProps = BaseLinkProps & + TextStyleProp & + Pick & Pick & { disableUnderline?: boolean - title?: TextProps['title'] + children: React.ReactNode } export function InlineLinkText({ @@ -355,6 +355,7 @@ export function WebOnlyInlineLinkText({ {children} ) : ( + // @ts-expect-error can't determine type of `children` to infer `emoji` {children} ) } diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 8f6358dd5a..9054ffb8e1 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -105,6 +105,7 @@ export function RichText({ els.push( , ) } else if (link && AppBskyRichtextFacet.validateLink(link).success) { + const url = toShortUrl(segment.text) if (disableLinks) { - els.push(toShortUrl(segment.text)) + els.push(url) } else { els.push( - {toShortUrl(segment.text)} + {url} , ) }