aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Message.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Message.js')
-rw-r--r--vnext/src/components/Message.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js
index 032504c3..6afb8d96 100644
--- a/vnext/src/components/Message.js
+++ b/vnext/src/components/Message.js
@@ -11,7 +11,7 @@ import { format } from '../utils/embed';
import './Message.css';
-const Message = React.memo(({ data, visitor, children, ...rest }) => {
+function Message({ data, visitor, children, ...rest }) {
return (
<div className="msg-cont">
<header className="h">
@@ -25,7 +25,7 @@ const Message = React.memo(({ data, visitor, children, ...rest }) => {
</Link>
</div>
</Avatar>
- <Tags user={data.user} data={data.tags || []} />
+ <TagsList user={data.user} data={data.tags || []} />
</header>
<div className="msg-txt">
<p dangerouslySetInnerHTML={{ __html: format(data.body, data.mid, (data.tags || []).indexOf('code') >= 0) }}></p>
@@ -82,11 +82,11 @@ const Message = React.memo(({ data, visitor, children, ...rest }) => {
{children}
</div>
);
-});
+}
-export default Message;
+export default React.memo(Message);
-const Tags = React.memo(({ data, user, ...rest }) => {
+function Tags({ data, user, ...rest }) {
return data.length > 0 && (
<div className="msg-tags">
{
@@ -96,7 +96,9 @@ const Tags = React.memo(({ data, user, ...rest }) => {
}
</div>
);
-});
+}
+
+const TagsList = React.memo(Tags);
Message.propTypes = {
data: MessageType,