Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev Autor Línea Nro. Línea
2936 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 AppliedJobsList({ jobs = [], loading, onComplete }) {
10
  const labels = useSelector(({ intl }) => intl.labels)
11
 
12
  if (loading) {
13
    return <Spinner />
14
  }
15
 
16
  if (!jobs.length) {
17
    return <EmptySection align='left' message={labels.datatable_szerorecords} />
18
  }
19
 
20
  return (
21
    <ProfileCardsGrid>
22
      {jobs.map(({ id, title, employment_type, ...rest }) => (
23
        <ProfileItem
24
          key={id}
25
          name={title}
26
          status={employment_type}
27
          {...rest}
28
          fetchCallback={onComplete}
29
          btnAcceptTitle={labels.view_job}
30
          btnLeaveTitle={labels.job_request_cancel}
31
        />
32
      ))}
33
    </ProfileCardsGrid>
34
  )
35
}