Proyectos de Subversion LeadersLinked - SPA

Rev

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

import React from 'react';

import { List } from '..';
import { CommentItem } from './CommentItem';

export function CommentsList({ comments = [], onDelete, onReport }) {
  return (
    <List
      items={comments}
      renderItem={(comment) => (
        <CommentItem
          comment={comment}
          onDelete={
            comment.link_delete ? onDelete.bind(null, comment.link_delete, comment.uuid) : null
          }
          onReport={
            comment.link_abuse_report ? onReport.bind(null, comment.link_abuse_report) : null
          }
        />
      )}
      emptyMessage='No hay comentarios para mostrar'
      keyExtractor={(comment) => comment.uuid}
    />
  );
}