More requested changes made and TS error solving

This commit is contained in:
André 2024-01-29 16:08:19 -03:00
parent 034df4cd19
commit ad8f6bee00

View File

@ -114,6 +114,7 @@ const ChatMesssage: React.FC<ChatMessageProps> = ({
hour: 'numeric',
minute: 'numeric',
});
const msgTime = formattedTime;
const clearMessage = `${msgTime} ${intl.formatMessage(intlMessages.chatClear)}`;
@ -207,8 +208,8 @@ const ChatMesssage: React.FC<ChatMessageProps> = ({
}, []);
return (
<ChatWrapper isSystemSender={isSystemSender} sameSender={sameSender} ref={messageRef}>
{(!message?.user || !sameSender) &&
(message.messageType !== ChatMessageType.USER_AWAY_STATUS_MSG
{(!message?.user || !sameSender) && (
message.messageType !== ChatMessageType.USER_AWAY_STATUS_MSG
&& message.messageType !== ChatMessageType.CHAT_CLEAR) && (
<ChatAvatar
avatar={message.user?.avatar}