From e3a526e2d74b475e35ced3f9a8508055281accc9 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Wed, 13 Jul 2022 12:57:01 +0100 Subject: [PATCH] fix: type errors with markdown content --- src/components/common/messaging/Message.tsx | 3 ++- .../messaging/attachments/MessageReply.tsx | 16 +++++++++------- .../common/messaging/bars/ReplyBar.tsx | 16 +++++++++------- .../modals/components/legacy/UserProfile.tsx | 16 ++++++++++------ 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/components/common/messaging/Message.tsx b/src/components/common/messaging/Message.tsx index e7521660..76c3afc1 100644 --- a/src/components/common/messaging/Message.tsx +++ b/src/components/common/messaging/Message.tsx @@ -159,7 +159,8 @@ const Message = observer( /> )} - {replacement ?? } + {replacement ?? + (content && )} {!queued && } {queued?.error && ( diff --git a/src/components/common/messaging/attachments/MessageReply.tsx b/src/components/common/messaging/attachments/MessageReply.tsx index 8a130362..cd3dc4b5 100644 --- a/src/components/common/messaging/attachments/MessageReply.tsx +++ b/src/components/common/messaging/attachments/MessageReply.tsx @@ -221,13 +221,15 @@ export const MessageReply = observer( )} - + {message.content && ( + + )} )} diff --git a/src/components/common/messaging/bars/ReplyBar.tsx b/src/components/common/messaging/bars/ReplyBar.tsx index c2d08e20..5c7ab374 100644 --- a/src/components/common/messaging/bars/ReplyBar.tsx +++ b/src/components/common/messaging/bars/ReplyBar.tsx @@ -185,13 +185,15 @@ export default observer(({ channel, replies, setReplies }: Props) => { hideInfo /> ) : ( - + message.content && ( + + ) )} diff --git a/src/controllers/modals/components/legacy/UserProfile.tsx b/src/controllers/modals/components/legacy/UserProfile.tsx index a7cc7f8e..0ec0eebd 100644 --- a/src/controllers/modals/components/legacy/UserProfile.tsx +++ b/src/controllers/modals/components/legacy/UserProfile.tsx @@ -322,13 +322,17 @@ export const UserProfile = observer( /> )} {profile?.content && ( -
- -
+ <> +
+ +
+
+ +
+ )} -
- -
{/*
*/} ) : (