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:
parent
59d544c5f4
commit
cf30f13eff
5 changed files with 49 additions and 11 deletions
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue