fix: fix key

This commit is contained in:
fantasticit 2022-05-10 11:48:02 +08:00
parent f819b61f03
commit 512018a1c0
1 changed files with 2 additions and 3 deletions

View File

@ -17,9 +17,8 @@ const CommentInner = ({ data, depth, replyComment, editComment, deleteComment })
{(data || []).map((item) => { {(data || []).map((item) => {
const hasChildren = item.children && item.children.length; const hasChildren = item.children && item.children.length;
return ( return (
<> <div key={item.id}>
<CommentItem <CommentItem
key={item.id}
comment={item} comment={item}
replyComment={replyComment} replyComment={replyComment}
editComment={editComment} editComment={editComment}
@ -35,7 +34,7 @@ const CommentInner = ({ data, depth, replyComment, editComment, deleteComment })
deleteComment={deleteComment} deleteComment={deleteComment}
/> />
) : null} ) : null}
</> </div>
); );
})} })}
</div> </div>