check comment owner by username

This commit is contained in:
GotPPay
2018-08-16 10:35:55 +02:00
parent fed5ecafc4
commit b18a87790a

View File

@@ -25,12 +25,12 @@ class OrderComments extends Component {
this.setState({newComment}); this.setState({newComment});
} }
getOffset(isOwner){ getOffset(username){
return isOwner ? 6 : 0; return (username === localStorage.getItem('username')) ? 6 : 0;
} }
getClassByOwner(isOwner){ getClassByOwner(username){
return isOwner ? 'mine' : ''; return (username === localStorage.getItem('username')) ? 'mine' : '';
} }
render() { render() {