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.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js
index 1ecbf996..f303d5eb 100644
--- a/vnext/src/components/Message.js
+++ b/vnext/src/components/Message.js
@@ -9,7 +9,7 @@ import Avatar from './Avatar';
import { format } from '../utils/embed';
-export default function Message({ data, visitor, children, ...rest }) {
+const Message = React.memo(({ data, visitor, children, ...rest }) => {
return (
<div className="msg-cont">
<header className="h">
@@ -80,16 +80,15 @@ export default function Message({ data, visitor, children, ...rest }) {
</a>
</>
)}
- {data.FriendsOnly && (
- <a href="#" className="a-privacy">Открыть доступ</a>
- )}
</nav>
{children}
</div>
);
-}
+});
+
+export default Message;
-function Tags({ data, user, ...rest }) {
+const Tags = React.memo(({ data, user, ...rest }) => {
return data.length > 0 && (
<div className="msg-tags">
{
@@ -99,7 +98,7 @@ function Tags({ data, user, ...rest }) {
}
</div>
);
-}
+});
Message.propTypes = {
data: MessageType,