#995 use `asAnchor` on external embeds (#1043)

* use asAnchor on external embeds

* add noFeedback back, fix TouchableWithoutFeedback anchor handling
zio/stable
Eric Bailey 2023-07-21 17:17:35 -05:00 committed by GitHub
parent 7e1dac0439
commit bf00d49863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -89,12 +89,11 @@ export const Link = observer(function Link({
<TouchableWithoutFeedback
testID={testID}
onPress={onPress}
// @ts-ignore web only -prf
href={asAnchor ? sanitizeUrl(href) : undefined}
accessible={accessible}
accessibilityRole="link"
{...props}>
<View style={style}>
{/* @ts-ignore web only -prf */}
<View style={style} href={asAnchor ? sanitizeUrl(href) : undefined}>
{children ? children : <Text>{title || 'link'}</Text>}
</View>
</TouchableWithoutFeedback>

View File

@ -181,9 +181,10 @@ export function PostEmbeds({
return (
<Link
asAnchor
noFeedback
style={[styles.extOuter, pal.view, pal.border, style]}
href={link.uri}
noFeedback>
href={link.uri}>
<ExternalLinkEmbed link={link} />
</Link>
)