Rev 3665 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';
import { List } from '..';
import { CommentItem } from './CommentItem';
export function CommentList({ comments = [], onDelete, onReport }) {
return (
<List
items={comments}
renderItem={(comment) => (
<CommentItem
comment={comment}
onDelete={comment.link_delete ? () => onDelete(comment.link_delete) : null}
onReport={comment.link_abuse_report ? () => onReport(comment.link_abuse_report) : null}
/>
)}
emptyMessage='No hay comentarios para mostrar'
keyExtractor={(comment) => comment.uuid}
/>
);
}