From 368286ad67436e379324be9f81f9e2949ebff12c Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Fri, 18 Nov 2022 11:37:25 -0600
Subject: Fix richtext link rendering

---
 src/view/com/util/RichText.tsx | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

(limited to 'src/view/com/util/RichText.tsx')

diff --git a/src/view/com/util/RichText.tsx b/src/view/com/util/RichText.tsx
index 8fea5f63e..35948455a 100644
--- a/src/view/com/util/RichText.tsx
+++ b/src/view/com/util/RichText.tsx
@@ -1,6 +1,6 @@
 import React from 'react'
-import {Text, TextStyle, StyleProp} from 'react-native'
-import {Link} from './Link'
+import {Text, TextStyle, StyleProp, View} from 'react-native'
+import {TextLink} from './Link'
 import {s} from '../../lib/styles'
 
 type TextSlice = {start: number; end: number}
@@ -30,26 +30,20 @@ export function RichText({
   let key = 0
   for (const segment of segments) {
     if (typeof segment === 'string') {
-      els.push(
-        <Text key={key} style={style}>
-          {segment}
-        </Text>,
-      )
+      els.push(segment)
     } else {
       els.push(
-        <Link
+        <TextLink
           key={key}
-          title={segment.text}
-          href={`/profile/${segment.entity.value}`}>
-          <Text key={key} style={[style, s.blue3]}>
-            {segment.text}
-          </Text>
-        </Link>,
+          text={segment.text}
+          href={`/profile/${segment.entity.value}`}
+          style={[style, s.blue3]}
+        />,
       )
     }
     key++
   }
-  return <>{els}</>
+  return <Text style={style}>{els}</Text>
 }
 
 function sortByIndex(a: Entity, b: Entity) {
-- 
cgit 1.4.1

