From 6e2b7a0b90ae8140d81d2d66c87ec9e40d9f45ec Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Fri, 18 Nov 2022 13:59:17 -0600 Subject: Add support for web links --- src/view/com/util/RichText.tsx | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 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 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( - , - ) + if (segment.entity.type === 'mention') { + els.push( + , + ) + } else if (segment.entity.type === 'link') { + els.push( + , + ) + } } key++ } -- cgit 1.4.1