Detect links in profile bios

This commit is contained in:
Paul Frazee
2022-11-23 14:53:33 -06:00
parent b844e479a1
commit 8e46204617
4 changed files with 22 additions and 4 deletions
+7 -1
View File
@@ -15,10 +15,12 @@ export function RichText({
text,
entities,
style,
numberOfLines,
}: {
text: string
entities?: Entity[]
style?: StyleProp<TextStyle>
numberOfLines?: number
}) {
if (!entities?.length) {
return <Text style={style}>{text}</Text>
@@ -55,7 +57,11 @@ export function RichText({
}
key++
}
return <Text style={style}>{els}</Text>
return (
<Text style={style} numberOfLines={numberOfLines}>
{els}
</Text>
)
}
function sortByIndex(a: Entity, b: Entity) {