diff options
Diffstat (limited to 'src/view/com/util/RichText.tsx')
-rw-r--r-- | src/view/com/util/RichText.tsx | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/view/com/util/RichText.tsx b/src/view/com/util/RichText.tsx index 35948455a..f865c873a 100644 --- a/src/view/com/util/RichText.tsx +++ b/src/view/com/util/RichText.tsx @@ -32,14 +32,25 @@ export function RichText({ if (typeof segment === 'string') { els.push(segment) } else { - els.push( - <TextLink - key={key} - text={segment.text} - href={`/profile/${segment.entity.value}`} - style={[style, s.blue3]} - />, - ) + if (segment.entity.type === 'mention') { + els.push( + <TextLink + key={key} + text={segment.text} + href={`/profile/${segment.entity.value}`} + style={[style, s.blue3]} + />, + ) + } else if (segment.entity.type === 'link') { + els.push( + <TextLink + key={key} + text={segment.text} + href={segment.entity.value} + style={[style, s.blue3]} + />, + ) + } } key++ } |