1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

comment deletion

This commit is contained in:
Fedor Katurov 2019-11-29 12:32:44 +07:00
parent 59d544c5f4
commit cf30f13eff
5 changed files with 49 additions and 11 deletions

View file

@ -25,14 +25,18 @@ const Comment: FC<IProps> = memo(
{...props}
>
<div className={styles.wrap}>
{comment_group.comments.map(comment => (
<CommentContent
comment={comment}
key={comment.id}
can_edit={can_edit}
onDelete={onDelete}
/>
))}
{comment_group.comments.map(comment =>
comment.deleted_at ? (
<div key={comment.id}>deleted</div>
) : (
<CommentContent
comment={comment}
key={comment.id}
can_edit={can_edit}
onDelete={onDelete}
/>
)
)}
</div>
</CommentWrapper>
);