From 236b10503612706ed914678d942ac604f2973f47 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 27 Sep 2020 21:54:39 -0700 Subject: Implement notification settings --- modern/src/EditItemView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modern/src/EditItemView.js') diff --git a/modern/src/EditItemView.js b/modern/src/EditItemView.js index a6f1d22..16fbbae 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) { -- cgit v1.2.3