Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3659 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3665 stevensc 1
import React from 'react';
3508 stevensc 2
 
3
import { List } from '..';
4
import { CommentItem } from './CommentItem';
5
 
3549 stevensc 6
export function CommentList({ comments = [], onDelete, onReport }) {
3508 stevensc 7
  return (
8
    <List
9
      items={comments}
10
      renderItem={(comment) => (
11
        <CommentItem
12
          comment={comment}
3665 stevensc 13
          onDelete={comment.link_delete ? () => onDelete(comment.link_delete) : null}
14
          onReport={comment.link_abuse_report ? () => onReport(comment.link_abuse_report) : null}
3508 stevensc 15
        />
16
      )}
17
      emptyMessage='No hay comentarios para mostrar'
3520 stevensc 18
      keyExtractor={(comment) => comment.uuid}
3508 stevensc 19
    />
20
  );
21
}