Detect links in profile bios
This commit is contained in:
parent
2b37b6549b
commit
4eb8bc1249
4 changed files with 22 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue