Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3665 | | Comparar con el anterior | Ultima modificación | Ver Log |

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