diff --git a/client/src/components/Chat/MessageList.jsx b/client/src/components/Chat/MessageList.jsx index 84a4dc0a..7d580d61 100644 --- a/client/src/components/Chat/MessageList.jsx +++ b/client/src/components/Chat/MessageList.jsx @@ -1,5 +1,4 @@ import { BsArrow90DegLeft, BsArrow90DegRight } from 'react-icons/bs'; - import React, { useState } from 'react'; import BadWordsNext from 'bad-words-next'; @@ -10,7 +9,6 @@ import MessageSeen from './MessageSeen'; import PropTypes from 'prop-types'; import Status from './Status'; import chatHelper from 'src/lib/chatHelper'; - import en from 'bad-words-next/data/en.json'; import { useApp } from 'src/context/AppContext'; import { useChat } from 'src/context/ChatContext'; @@ -156,19 +154,13 @@ const MessageList = ({ __html: md.render( badwordChoices[id] === 'hide' ? badwords.filter(message) - : badwordChoices[id] === 'show' - ? message - : message + : badwordChoices[id] === 'show' && message ), }} /> ) : badwordChoices[id] === 'hide' ? ( badwords.filter(message) - ) : badwordChoices[id] === 'show' ? ( - message - ) : ( - message - )} + ) : badwordChoices[id] === 'show' && message}