fix: state

This commit is contained in:
cha0s 2021-01-24 19:22:41 -06:00
parent c6d215361d
commit 5b389ba781

View File

@ -6,19 +6,21 @@ const Existent = ({json}) => (
<div className="existent">
<label>
Is ticking
<input type="checkbox" checked={json.isTicking} />
<input type="checkbox" checked={json.state.isTicking} readOnly />
</label>
<label>
Name
<input type="text" value={json.name} />
<input type="text" value={json.state.name} readOnly />
</label>
</div>
);
Existent.propTypes = {
json: PropTypes.shape({
isTicking: PropTypes.bool,
name: PropTypes.string,
state: PropTypes.shape({
isTicking: PropTypes.bool,
name: PropTypes.string,
}),
}).isRequired,
};