change comments handling

This commit is contained in:
GotPPay
2018-08-15 22:19:24 +02:00
parent 152804d6dc
commit 768e3b919e
2 changed files with 14 additions and 11 deletions

View File

@@ -18,7 +18,7 @@ class OrderComments extends Component {
}
addNewComment(){
this.props.dispatch(addComment(this.props.orderInfo.id, this.state.newComment));
this.props.dispatch(addComment(this.props.orderInfo.id, this.state.newComment, this.props.orderComments));
}
onEditorChange(newComment){
@@ -48,7 +48,7 @@ class OrderComments extends Component {
<Row key={'order-comment-' + index}>
<Col xl={{size:6, offset:this.getOffset(orderComment.isOwner)}}>
<div className={'order-comment ' + this.getClassByOwner(orderComment.isOwner)} key={'order-comment-' + index}>
<div className="order-comment-header">{orderComment.username} - {orderComment.addDate}</div>
<div className="order-comment-header">{orderComment.username} - {orderComment.date}</div>
<div dangerouslySetInnerHTML={{__html: orderComment.comment}}></div>
</div>
</Col>