Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev Autor Línea Nro. Línea
2846 stevensc 1
import React from 'react'
1650 stevensc 2
 
2845 stevensc 3
import CommentItem from './comment-item'
4
import EmptySection from '@components/UI/EmptySection'
1650 stevensc 5
 
2846 stevensc 6
export default function CommentsList({ comments = [], onDelete, onReport }) {
2845 stevensc 7
  if (!comments.length) {
8
    return <EmptySection message='No hay comentarios' />
9
  }
10
 
2846 stevensc 11
  return comments.map((comment) => (
12
    <CommentItem
13
      key={comment.unique}
14
      comment={comment}
15
      onDelete={onDelete}
16
      onReport={onReport}
17
    />
18
  ))
2185 stevensc 19
}