Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3665 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

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