Fixing comment buttons now.

This commit is contained in:
Dessalines 2019-08-19 15:39:45 -07:00
parent 1fe8ecaf7a
commit ee9d053251

View file

@ -62,13 +62,13 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
return ( return (
<div className={`comment ${node.comment.parent_id && !this.props.noIndent ? 'ml-4' : ''}`}> <div className={`comment ${node.comment.parent_id && !this.props.noIndent ? 'ml-4' : ''}`}>
<div className={`vote-bar mr-1 float-left small text-center ${this.props.viewOnly && 'no-click'}`}> <div className={`vote-bar mr-1 float-left small text-center ${this.props.viewOnly && 'no-click'}`}>
<div className={`pointer ${node.comment.my_vote == 1 ? 'text-info' : 'text-muted'}`} onClick={linkEvent(node, this.handleCommentLike)}> <button className={`btn btn-sm p-0 ${node.comment.my_vote == 1 ? 'text-info' : 'text-muted'}`} onClick={linkEvent(node, this.handleCommentLike)}>
<svg class="pointer icon upvote"><use xlinkHref="#icon-arrow-up"></use></svg> <svg class="icon upvote"><use xlinkHref="#icon-arrow-up"></use></svg>
</div> </button>
<div class={`font-weight-bold text-muted`}>{node.comment.score}</div> <div class={`font-weight-bold text-muted`}>{node.comment.score}</div>
<div className={`pointer ${node.comment.my_vote == -1 ? 'text-danger' : 'text-muted'}`} onClick={linkEvent(node, this.handleCommentDisLike)}> <button className={`btn btn-sm p-0 ${node.comment.my_vote == -1 ? 'text-danger' : 'text-muted'}`} onClick={linkEvent(node, this.handleCommentDisLike)}>
<svg class="pointer icon downvote"><use xlinkHref="#icon-arrow-down"></use></svg> <svg class="icon downvote"><use xlinkHref="#icon-arrow-down"></use></svg>
</div> </button>
</div> </div>
<div id={`comment-${node.comment.id}`} className={`details comment-node ml-4 ${this.isCommentNew ? 'mark' : ''}`}> <div id={`comment-${node.comment.id}`} className={`details comment-node ml-4 ${this.isCommentNew ? 'mark' : ''}`}>
<ul class="list-inline mb-0 text-muted small"> <ul class="list-inline mb-0 text-muted small">