diff --git a/src/components/Epochs.js b/src/components/Epochs.js index 058903f..55e915e 100644 --- a/src/components/Epochs.js +++ b/src/components/Epochs.js @@ -3,11 +3,21 @@ import './Epochs.scss'; import SoundChangeSuite from './SoundChangeSuite'; +const addEpoch = (e, props) => { + console.log(props) + e.preventDefault() + props.setEpochs([...props.epochs, {name: '', changes:['']}]) + console.log(props) +} + const Epochs = props => { return (

Sound Change Epochs

- {props.epochs ? props.epochs.map(epoch => ) : <>} + {props.epochs ? props.epochs.map((epoch, idx) => ) : <>} +
addEpoch(e, props)}> + +
); }