Detect links in profile bios

This commit is contained in:
Paul Frazee 2022-11-23 14:53:33 -06:00
parent 2b37b6549b
commit 4eb8bc1249
4 changed files with 22 additions and 4 deletions

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) {