refactor const edits

This commit is contained in:
Ed Chalstrey 2022-05-19 16:54:24 +01:00
parent b512c58f90
commit bb9d1468cc

View File

@ -247,15 +247,9 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
this.setState({error: err}); this.setState({error: err});
} }
if (slug == 'current_landuse_group'){ const edits = (slug == 'current_landuse_group') ?
const edits = { {['current_landuse_verified']: true} :
['current_landuse_verified']: true {[slug]: value}
};
} else {
const edits = {
[slug]: value
};
}
this.doSubmit(edits); this.doSubmit(edits);
console.log(slug + " verify button clicked") console.log(slug + " verify button clicked")