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.
 
 
 

31 lines
756 B

  1. import React from 'react';
  2. import Container from 'react-bootstrap/Container';
  3. import useInWidthRange from '../../hooks/InWidthRange';
  4. import { JobListProps } from './types';
  5. import JobsAccordion from './JobsAccordion';
  6. import JobsCards, { JobsCardsPlaceholder } from './JobsCards';
  7. export type Props = {
  8. heading: string,
  9. } & JobListProps
  10. export default function JobHistory(props: Props) {
  11. const {SizeWrapper, inRange} = useInWidthRange(600)
  12. const jobsList = inRange === undefined
  13. ? <JobsCardsPlaceholder />
  14. : (inRange
  15. ? <JobsAccordion {...props} />
  16. : <JobsCards {...props} />)
  17. return (
  18. <Container fluid>
  19. <h2>{props.heading}</h2>
  20. <SizeWrapper>
  21. {jobsList}
  22. </SizeWrapper>
  23. </Container>
  24. )
  25. }