Rev 2845 | Rev 2847 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'
import CommentItem from './comment-item'
import EmptySection from '@components/UI/EmptySection'
export default function CommentsList({ comments = [], onDelete, onReport }) {
if (!comments.length) {
return <EmptySection message='No hay comentarios' />
}
return comments.map((comment) => (
<CommentItem
key={comment.unique}
comment={comment}
onDelete={onDelete}
onReport={onReport}
/>
))
}