Rev 2880 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';import { useSelector } from 'react-redux';import Spinner from '@components/UI/Spinner';import EmptySection from '@components/UI/EmptySection';import ProfileItem from '@components/profile/ProfileItem';import ProfileCardsGrid from '@components/UI/ProfileCardsGrid';export default function CompanyWhenIWorkList({ companies = [], loading, onComplete }) {const labels = useSelector(({ intl }) => intl.labels);if (loading) {return <Spinner />;}if (!companies.length) {return <EmptySection align='left' message={labels.datatable_szerorecords} />;}return (<ProfileCardsGrid>{companies.map(({ id, link_my_company, ...rest }) => (<ProfileItemkey={id}link_admin={link_my_company}fetchCallback={onComplete}btnAcceptTitle={labels.view_company}btnLeaveTitle={labels.company_leave}{...rest}/>))}</ProfileCardsGrid>);}