diff options
Diffstat (limited to 'vnext/src/components/Message.js')
-rw-r--r-- | vnext/src/components/Message.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js index ae981df6..d9a32a11 100644 --- a/vnext/src/components/Message.js +++ b/vnext/src/components/Message.js @@ -47,7 +47,7 @@ export default function Message({ data, visitor, children, ...rest }) { <span> Recommend</span> </a> ) : visitor.uid > 0 ? ( - <Link to={{ pathname: "/post", search: `?body=!+%23${data.mid}` }} className="a-like msg-button"> + <Link to={{ pathname: '/post', search: `?body=!+%23${data.mid}` }} className="a-like msg-button"> <span className="msg-button-icon"> <Icon name="ei-heart" size="s" /> {data.likes > 0 && (` ${data.likes}`)} @@ -63,13 +63,13 @@ export default function Message({ data, visitor, children, ...rest }) { <span> Recommend</span> </a> )} - {!Boolean(data.ReadOnly) | (visitor.uid === data.user.uid) && ( + {!data.ReadOnly | (visitor.uid === data.user.uid) && ( <React.Fragment> <Link to={{ pathname: `/${data.user.uname}/${data.mid}`, state: { msg: data } }} className="a-comment msg-button"> <span className="msg-button-icon"> <Icon name="ei-comment" size="s" /> {data.replies > 0 && - (Boolean(data.unread) ? ( + (data.unread ? ( <span className="badge">${data.replies}</span> ) : ( `${data.replies}` @@ -107,6 +107,7 @@ function Tags({ data, user, ...rest }) { Message.propTypes = { data: MessageType, + visitor: UserType.isRequired, children: PropTypes.node }; |