import get from 'lodash/get'; import React from 'react'; import { validate } from 'uuid'; export type SectionProps = { path: string; titlePath?: string | string[]; subtitlePath?: string | string[]; headlinePath?: string | string[]; keywordsPath?: string; }; const sectionMap = (Section: React.FC): Record => ({ work:
, education: (
), awards:
, certifications: (
), publications:
, skills:
, languages:
, interests:
, projects: (
), volunteer:
, references:
, }); export const getSectionById = (id: string, Section: React.FC): JSX.Element => { if (validate(id)) { return
; } return get(sectionMap(Section), id); }; export default sectionMap;