Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2844 Rev 2845
Línea 3... Línea 3...
3
 
3
 
4
import { axios } from '@app/utils'
4
import { axios } from '@app/utils'
5
import { addNotification } from '@app/redux/notification/notification.actions'
5
import { addNotification } from '@app/redux/notification/notification.actions'
Línea 6... Línea -...
6
import { showReportModal } from '@app/redux/report/report.actions'
-
 
7
 
-
 
8
import { CommentsContainer } from './comments-ui'
6
import { showReportModal } from '@app/redux/report/report.actions'
-
 
7
 
-
 
8
import CommentItem from './comment-item'
Línea 9... Línea 9...
9
import ConfirmModal from '@app/components/modals/ConfirmModal'
9
import ConfirmModal from '@app/components/modals/ConfirmModal'
10
import CommentItem from './comment-item'
10
import EmptySection from '@components/UI/EmptySection'
11
 
11
 
12
export default function CommentsList({ comments: defaultComments = [] }) {
12
export default function CommentsList({ comments: defaultComments = [] }) {
Línea 61... Línea 61...
61
      })
61
      })
62
  }
62
  }
Línea 63... Línea 63...
63
 
63
 
Línea -... Línea 64...
-
 
64
  useEffect(() => setComments(defaultComments), [defaultComments])
-
 
65
 
-
 
66
  if (!comments.length) {
-
 
67
    return <EmptySection message='No hay comentarios' />
64
  useEffect(() => setComments(defaultComments), [defaultComments])
68
  }
65
 
69
 
66
  return (
-
 
67
    <>
70
  return (
68
      <CommentsContainer>
71
    <>
69
        {comments.map((comment) => (
72
      {comments.map((comment) => (
70
          <CommentItem
73
        <CommentItem
71
            key={comment.unique}
74
          key={comment.unique}
72
            comment={comment}
75
          comment={comment}
73
            onDelete={handleDelete}
76
          onDelete={handleDelete}
74
            onReport={reportComment}
77
          onReport={reportComment}
75
          />
-
 
76
        ))}
78
        />
77
      </CommentsContainer>
79
      ))}
78
      <ConfirmModal
80
      <ConfirmModal
79
        show={showConfirm}
81
        show={showConfirm}
80
        onClose={onCloseConfirm}
82
        onClose={onCloseConfirm}