|
|
@@ -4,16 +4,12 @@ import Container from 'react-bootstrap/Container'; |
|
|
|
import Col from 'react-bootstrap/Col'; |
|
|
|
import Row from 'react-bootstrap/Row'; |
|
|
|
import JobCard from './JobCard'; |
|
|
|
import { partition } from '../utils'; |
|
|
|
import { partition } from '../../utils'; |
|
|
|
import { Job, Jobs } from '@/PersonalDataTypes'; |
|
|
|
import useSize from '../hooks/Size'; |
|
|
|
import useSize from '../../hooks/Size'; |
|
|
|
import { Accordion } from 'react-bootstrap'; |
|
|
|
import { JobListProps } from './types'; |
|
|
|
|
|
|
|
type JobListProps = { |
|
|
|
jobs: Jobs, |
|
|
|
entriesPerRow?: number, |
|
|
|
currentHeading?: string, |
|
|
|
} |
|
|
|
|
|
|
|
export type Props = { |
|
|
|
heading: string, |
|
|
@@ -49,7 +45,7 @@ function FullList(props: JobListProps) { |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
function SmallList(props: JobListProps) { |
|
|
|
export default function JobsAccordion(props: JobListProps) { |
|
|
|
const {jobs} = props |
|
|
|
const config = {...defaultProps, ...props} |
|
|
|
function jobTitle(job: Job) { |
|
|
@@ -76,19 +72,3 @@ function SmallList(props: JobListProps) { |
|
|
|
</Accordion> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
export default function JobHistory(props: Props) { |
|
|
|
const {SizeWrapper, size} = useSize() |
|
|
|
const jobs = props.jobs |
|
|
|
|
|
|
|
const jobsList = size.width < 600 ? <SmallList {...props} /> : <FullList {...props} /> |
|
|
|
|
|
|
|
return ( |
|
|
|
<Container> |
|
|
|
<h2>{props.heading}</h2> |
|
|
|
<SizeWrapper> |
|
|
|
{jobsList} |
|
|
|
</SizeWrapper> |
|
|
|
</Container> |
|
|
|
) |
|
|
|
} |