import React, { useState, useContext } from 'react'; import { useTranslation } from 'react-i18next'; import { v4 as uuidv4 } from 'uuid'; import set from 'lodash/set'; import TextField from '../../../shared/TextField'; import TextArea from '../../../shared/TextArea'; import AppContext from '../../../context/AppContext'; import Checkbox from '../../../shared/Checkbox'; import { addItem } from '../../../utils'; import ItemActions from '../../../shared/ItemActions'; import AddItemButton from '../../../shared/AddItemButton'; import ItemHeading from '../../../shared/ItemHeading'; const WorkTab = ({ data, onChange }) => { const context = useContext(AppContext); const { dispatch } = context; return ( <>
onChange('data.work.enable', v)} />
onChange('data.work.heading', v)} />

{data.work.items.map((x, index) => ( ))} ); }; const Form = ({ item, onChange, identifier = '' }) => { const { t } = useTranslation(['leftSidebar', 'app']); return (
onChange(`${identifier}title`, v)} /> onChange(`${identifier}role`, v)} />
onChange(`${identifier}start`, v)} /> onChange(`${identifier}end`, v)} />