Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2934 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3719 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 PeopleYouMayKnowList({ connections = [], loading, onComplete }) {
10
  const labels = useSelector(({ intl }) => intl.labels);
11
 
12
  if (loading) {
13
    return <Spinner />;
14
  }
15
 
16
  if (!connections.length) {
17
    return <EmptySection align='left' message={labels.datatable_szerorecords} />;
18
  }
19
 
20
  return (
21
    <ProfileCardsGrid>
22
      {connections.map(({ id, ...rest }) => (
23
        <ProfileItem key={id} {...rest} fetchCallback={onComplete} />
24
      ))}
25
    </ProfileCardsGrid>
26
  );
27
}