diff options
Diffstat (limited to 'vnext/src/ui/Comment.js')
-rw-r--r-- | vnext/src/ui/Comment.js | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/vnext/src/ui/Comment.js b/vnext/src/ui/Comment.js index 40ce0863..e8fb2afb 100644 --- a/vnext/src/ui/Comment.js +++ b/vnext/src/ui/Comment.js @@ -71,26 +71,28 @@ export default function Comment({ msg, draft, active, setActive, onStartEditing, { active === msg.rid && <MessageInput text={draft || ''} onSend={postComment} placeholder="Write a comment..." /> } - <div className="msg-links"> - { - visitor.uid > 0 ? ( - <> - {active === msg.rid || <span style={linkStyle} onClick={() => setActive(msg.rid)}>Reply</span>} - { - visitor.uid == msg.user.uid && - <> - <span> · </span> - <span style={linkStyle} onClick={() => onStartEditing(msg)}>Edit</span> - </> - } - </> - ) : ( - <> - <span> · </span>{active === msg.rid || <Button>Reply</Button>} - </> - ) - } - </div> + {visitor.uid > 0 && + <div className="msg-links"> + { + visitor.uid > 0 ? ( + <> + {active === msg.rid || <span style={linkStyle} onClick={() => setActive(msg.rid)}>Reply</span>} + { + visitor.uid == msg.user.uid && + <> + <span> · </span> + <span style={linkStyle} onClick={() => onStartEditing(msg)}>Edit</span> + </> + } + </> + ) : ( + <> + <span> · </span>{active === msg.rid || <Button>Reply</Button>} + </> + ) + } + </div> + } </div> ); } @@ -99,4 +101,4 @@ export default function Comment({ msg, draft, active, setActive, onStartEditing, */ const linkStyle = { cursor: 'pointer' -};
\ No newline at end of file +}; |