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