check comment owner by username

This commit is contained in:
GotPPay
2018-08-16 10:35:55 +02:00
parent 30faf9a910
commit 9134a44a71
3 changed files with 8 additions and 8 deletions

View File

@@ -69,8 +69,7 @@ export const addComment = (idOrder, newComment, existingComments) => {
const newCommentObject = {
comment : newComment,
date : moment().format("Do MMM, YY"),
username: 'username',
isOwner: 1,
username: localStorage.getItem('username') || '-',
}
const concatenatedComments = (existingComments) ? existingComments.concat(newCommentObject) : [newCommentObject];