Dejvino's Curriculum Vitae
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
1.1 KiB

  1. import React from 'react';
  2. import Container from 'react-bootstrap/Container';
  3. import Col from 'react-bootstrap/Col';
  4. import Row from 'react-bootstrap/Row';
  5. import JobCard, { JobCardPlaceholder } from './JobCard';
  6. import { partition } from '../../utils';
  7. import { JobListProps } from './types';
  8. export type Props = {
  9. heading: string,
  10. } & JobListProps
  11. const defaultProps = {
  12. entriesPerRow: 2,
  13. currentHeading: 'Currently',
  14. }
  15. export function JobsCardsPlaceholder() {
  16. return <Container>
  17. <Row><Col><JobCardPlaceholder /></Col></Row>
  18. <Row><Col><JobCardPlaceholder /></Col></Row>
  19. </Container>
  20. }
  21. export default function JobsCards(props: JobListProps) {
  22. const {jobs} = props
  23. const config = {...defaultProps, ...props}
  24. return (
  25. <Container fluid>
  26. {jobs.current && (
  27. <Row>
  28. <Col>
  29. <JobCard heading={config.currentHeading} {...jobs.current} />
  30. </Col>
  31. </Row>
  32. )}
  33. <Row>
  34. {jobs.previous?.map((job, index) => (
  35. <Col key={index} xs={12} md={12} lg={6} xl={12}>
  36. <JobCard {...job} />
  37. </Col>
  38. ))}
  39. </Row>
  40. </Container>
  41. )
  42. }