patch epochs to update with parent

This commit is contained in:
Sorrel Bri 2020-02-28 11:47:01 -08:00
parent a74d387834
commit d87a99c498
3 changed files with 5 additions and 3 deletions

View file

@ -29,7 +29,8 @@ const Epochs = ({epochs, errors, dispatch}) => {
const dispatchValue = {
name: epoch.name,
index: epochIndex,
changes: epoch.changes
changes: epoch.changes,
parent: epoch.parent
}
dispatch({
type: "SET_EPOCH",

View file

@ -46,9 +46,10 @@ const SoundChangeSuite = props => {
<select
name="parent"
list={`${epoch.name}-parents-list`}
value={epoch.parent}
value={epoch.parent || 'none'}
onChange={e=>changeHandler(
e, ()=>{
console.log(e.target.value)
setEpoch({...epoch, parent:e.target.value})
})
}

View file

@ -277,7 +277,7 @@ export const run = (state: stateType, action: resultsAction): stateType => {
}, []);
const results = passResults.map(stringifyResults);
return {...state, results }
return {...state, results, errors: {} }
} catch (err) {
console.log(err)
return {...state, errors: err };