Proyectos de Subversion LeadersLinked - SPA

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3682 stevensc 1
import React from 'react'
2
import { useSelector } from 'react-redux'
3
 
4
import Spinner from '@components/UI/Spinner'
5
import EmptySection from '@components/UI/EmptySection'
6
import ProfileItem from '@components/profile/ProfileItem'
7
import ProfileCardsGrid from '@components/UI/ProfileCardsGrid'
8
 
9
export default function GroupsRequestsReceivedList({
10
  groups = [],
11
  loading,
12
  onComplete
13
}) {
14
  const labels = useSelector(({ intl }) => intl.labels)
15
 
16
  if (loading) {
17
    return <Spinner />
18
  }
19
 
20
  if (!groups.length) {
21
    return <EmptySection align='left' message={labels.datatable_szerorecords} />
22
  }
23
 
24
  return (
25
    <ProfileCardsGrid>
26
      {groups.map(({ id, link_my_company, ...rest }) => (
27
        <ProfileItem
28
          key={id}
29
          {...rest}
30
          fetchCallback={onComplete}
31
          btnAcceptTitle={labels.group_view}
32
        />
33
      ))}
34
    </ProfileCardsGrid>
35
  )
36
}