From 7a8b12e15ce17fea0b34f705f529b59815fbb9c7 Mon Sep 17 00:00:00 2001 From: nizune <9-nizune@users.noreply.gitlab.insrt.uk> Date: Wed, 4 Aug 2021 19:59:29 +0200 Subject: [PATCH] Fixed sent attachments code --- .../messaging/attachments/MessageReply.tsx | 23 ++++------ .../common/messaging/bars/ReplyBar.tsx | 43 ++++++++----------- 2 files changed, 28 insertions(+), 38 deletions(-) diff --git a/src/components/common/messaging/attachments/MessageReply.tsx b/src/components/common/messaging/attachments/MessageReply.tsx index 14681495..88580bde 100644 --- a/src/components/common/messaging/attachments/MessageReply.tsx +++ b/src/components/common/messaging/attachments/MessageReply.tsx @@ -187,20 +187,15 @@ export const MessageReply = observer(({ index, channel, id }: Props) => { ); } }}> - {message.attachments && - message.attachments.length > 0 && ( - <> - - - {message.attachments.length > - 0 ? ( - - ) : ( - - )} - - - )} + {message.attachments && ( + <> + + {message.attachments.length > 1 ? + : + } + + + )} {
- {message.attachments && - message.attachments.length > 0 && ( - <> - - - {message.attachments!.length > - 1 ? ( - - ) : ( - - )} - - - )} - {message.author_id === SYSTEM_USER_ID ? ( - - ) : ( - - )} + {message.attachments && ( + <> + + {message.attachments.length > 1 ? + : + } + + + )} + {message.author_id === SYSTEM_USER_ID ? ( + + ) : ( + + )}