diff options
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) { |