Proyectos de Subversion LeadersLinked - SPA

Rev

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

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