Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
7317 stevensc 1
import React from 'react'
2
import { useSelector } from 'react-redux'
3
 
4
import ContactItem from './ContactItem'
5
import EmptySection from '../../UI/EmptySection'
6
 
7
const ContactsList = ({ contacts = [], selectConversation = () => null }) => {
8
  const labels = useSelector(({ intl }) => intl.labels)
9
 
10
  return (
11
    <div className="contacts-list">
12
      <ul>
13
        {!contacts.length ? (
14
          <EmptySection message={labels.datatable_szerorecords} />
15
        ) : (
16
          contacts.map((contact) => (
17
            <li key={contact.id}>
18
              <ContactItem contact={contact} onClick={selectConversation} />
19
            </li>
20
          ))
21
        )}
22
      </ul>
23
    </div>
24
  )
25
}
26
 
27
export default ContactsList