diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
commit | 236b10503612706ed914678d942ac604f2973f47 (patch) | |
tree | e557381dbdc721002346a0fc64b1a679280fa3f1 /modern/src/EditItemView.js | |
parent | 96af05dbf2171c4e194cf67c3c93d134ef467e50 (diff) | |
download | trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.gz trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.bz2 trackermap-web-236b10503612706ed914678d942ac604f2973f47.zip |
Implement notification settings
Diffstat (limited to 'modern/src/EditItemView.js')
-rw-r--r-- | modern/src/EditItemView.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/EditItemView.js b/modern/src/EditItemView.js index a6f1d229..16fbbaee 100644 --- a/modern/src/EditItemView.js +++ b/modern/src/EditItemView.js @@ -22,7 +22,7 @@ const useStyles = makeStyles(theme => ({ }, })); -const EditItemView = ({ children, endpoint, setItem, getItem }) => { +const EditItemView = ({ children, endpoint, item, setItem }) => { const history = useHistory(); const classes = useStyles(); const { id } = useParams(); @@ -47,7 +47,7 @@ const EditItemView = ({ children, endpoint, setItem, getItem }) => { const response = await fetch(url, { method: !id ? 'POST' : 'PUT', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(getItem()), + body: JSON.stringify(item), }); if (response.ok) { |