import React from 'react';
import { Job } from '@/PersonalDataTypes';
import { Accordion } from 'react-bootstrap';
import { JobListProps } from './types';
import JobTags from './JobTags';
import md from '../Markdown';
function JobTitle(props: {job: Job, heading?: string}) {
const {job, heading} = props
return (
{job.position}
{[job.company, job.timerange].filter(x => x).join(', ')}
{heading && (
({heading})
)}
)
}
function AccordionJobItem(props: {job: Job, eventKey: string, heading?: string}) {
const {job, eventKey} = props
return (
{md(job.description)}
{job.tags && }
)
}
export type Props = {
heading: string,
} & JobListProps
const defaultProps = {
entriesPerRow: 2,
currentHeading: 'Currently',
}
export default function JobsAccordion(props: JobListProps) {
const {jobs} = props
const config = {...defaultProps, ...props}
return (
{jobs.current?.map((job, index) => )}
{jobs.previous?.map((job, index) => )}
)
}