diff --git a/src/common/component/Message/Reply.js b/src/common/component/Message/Reply.js index 5cf0b796..2c834b98 100644 --- a/src/common/component/Message/Reply.js +++ b/src/common/component/Message/Reply.js @@ -98,6 +98,7 @@ const renderContent = (data) => { {reactStringReplace( content, + // eslint-disable-next-line no-useless-escape /(\s{1}\@[0-9]+\s{1})/g, (match, idx) => { console.log("match", match); diff --git a/src/common/component/Send/Replying.js b/src/common/component/Send/Replying.js index 28d3f502..fc04f2dd 100644 --- a/src/common/component/Send/Replying.js +++ b/src/common/component/Send/Replying.js @@ -35,15 +35,17 @@ const Styled = styled.div` } .content { white-space: normal; - height: 20px; - /* overflow-y: hidden; */ color: #616161; overflow: hidden; - /* text-overflow: ellipsis; */ padding-right: 30px; font-weight: 500; font-size: 14px; line-height: 20px; + > .pic { + width: 50px; + height: 50px; + object-fit: cover; + } .md { position: relative; max-height: 100px; @@ -81,7 +83,7 @@ const Styled = styled.div` } `; const renderContent = (data) => { - const { content_type, content, properties } = data; + const { content_type, content, thumbnail = "", properties } = data; let res = null; switch (content_type) { case ContentTypes.text: @@ -105,8 +107,10 @@ const renderContent = (data) => { case ContentTypes.file: { const { content_type, name, size } = properties; - if (isImage(content_type, size)) { - res = ; + const image = isImage(content_type, size); + // console.log("replying data", content_type, size, image); + if (image) { + res = ; } else { const icon = getFileIcon(content_type, name); res = ( @@ -121,6 +125,7 @@ const renderContent = (data) => { default: break; } + // console.log("replying data", data); return res; }; export default function Replying({ context, id, mid }) { @@ -136,10 +141,10 @@ export default function Replying({ context, id, mid }) { const user = contactsData[from_uid]; return ( - +
Replying to {user?.name} - - {renderContent(msg)} +
+
{renderContent(msg)}