From 3915bb43169ae501d81571c5e1efa12cf0e24dbb Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 4 Apr 2024 21:34:55 +0100 Subject: Enforce Text suffix for Text-rendering components (#3407) * Rm unused * Add Text suffix to Title/Description * Add Text suffix to text components * Add Text suffix to props * Validate Text components returns --- src/components/RichText.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/components/RichText.tsx') diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 0e89e13b7..5cfa0b24f 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -7,7 +7,7 @@ import {toShortUrl} from '#/lib/strings/url-helpers' import {isNative} from '#/platform/detection' import {atoms as a, flatten, native, TextStyleProp, useTheme, web} from '#/alf' import {useInteractionState} from '#/components/hooks/useInteractionState' -import {InlineLink} from '#/components/Link' +import {InlineLinkText} from '#/components/Link' import {TagMenu, useTagMenuControl} from '#/components/TagMenu' import {Text, TextProps} from '#/components/Typography' @@ -84,7 +84,7 @@ export function RichText({ !disableLinks ) { els.push( - {segment.text} - , + , ) } else if (link && AppBskyRichtextFacet.validateLink(link).success) { if (disableLinks) { els.push(toShortUrl(segment.text)) } else { els.push( - {toShortUrl(segment.text)} - , + , ) } } else if ( -- cgit 1.4.1