Add delete button to comment

This commit is contained in:
riccardo
2019-10-02 16:53:35 +02:00
parent 2c2a0e0c82
commit 1d1169ab08

View File

@@ -65,10 +65,16 @@ const Comment = ({
onClick={() => handleToggleIsCommentUpdate(id, isPostUpdate)}
className="commentLink"
>
{ isPostUpdate ? 'No post update' : 'Post update' }
{ 'Post update: ' + (isPostUpdate ? 'yes' : 'no') }
</a>
<Separator />
<a href={`/admin/comments/${id}`} data-turbolinks="false">Edit</a>
<a href={`/admin/comments/${id}/edit`} data-turbolinks="false">Edit</a>
<Separator />
<a
href={`/admin/comments/${id}`}
data-method="delete"
data-confirm="Are you sure?"
data-turbolinks="false">Delete</a>
</React.Fragment>
: