Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2846 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2846 Rev 2847
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
-
 
2
import { styled } from '@mui/material'
Línea 2... Línea 3...
2
 
3
 
3
import CommentItem from './comment-item'
4
import CommentItem from './comment-item'
Línea -... Línea 5...
-
 
5
import EmptySection from '@components/UI/EmptySection'
-
 
6
 
-
 
7
const CommentsContainer = styled('div')(({ theme }) => ({
-
 
8
  display: 'flex',
-
 
9
  flexDirection: 'column',
-
 
10
  gap: theme.spacing(0.5),
-
 
11
  maxHeight: '300px',
-
 
12
  overflow: 'auto'
4
import EmptySection from '@components/UI/EmptySection'
13
}))
5
 
14
 
6
export default function CommentsList({ comments = [], onDelete, onReport }) {
15
export default function CommentsList({ comments = [], onDelete, onReport }) {
7
  if (!comments.length) {
16
  if (!comments.length) {
Línea -... Línea 17...
-
 
17
    return <EmptySection message='No hay comentarios' />
-
 
18
  }
8
    return <EmptySection message='No hay comentarios' />
19
 
9
  }
20
  return (
10
 
21
    <CommentsContainer>
11
  return comments.map((comment) => (
22
      {comments.map((comment) => (
12
    <CommentItem
23
        <CommentItem
13
      key={comment.unique}
24
          key={comment.unique}
14
      comment={comment}
25
          comment={comment}
-
 
26
          onDelete={onDelete}
-
 
27
          onReport={onReport}
15
      onDelete={onDelete}
28
        />
16
      onReport={onReport}
29
      ))}