remove possibility of vote from guests
This commit is contained in:
@@ -299,7 +299,7 @@ export default class Comment extends Component {
|
||||
<span className={b('comment__score', {}, { view: o.score.view })}>
|
||||
<span
|
||||
className={b('comment__vote', {}, { type: 'up', selected: scoreIncreased, disabled: isGuest || isCurrentUser })}
|
||||
onClick={this.increaseScore}
|
||||
onClick={isGuest || isCurrentUser ? null : this.increaseScore}
|
||||
title={isGuest ? 'Only authorized users are allowed to vote' : (isCurrentUser ? 'You can\'t vote for your own comment' : null)}
|
||||
>Vote up</span>
|
||||
|
||||
@@ -310,7 +310,7 @@ export default class Comment extends Component {
|
||||
|
||||
<span
|
||||
className={b('comment__vote', {}, { type: 'down', selected: scoreDecreased, disabled: isGuest || isCurrentUser })}
|
||||
onClick={this.decreaseScore}
|
||||
onClick={isGuest || isCurrentUser ? null : this.decreaseScore}
|
||||
title={isGuest ? 'Only authorized users are allowed to vote' : (isCurrentUser ? 'You can\'t vote for your own comment' : null)}
|
||||
>Vote down</span>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user