route to ide from part edit

This commit is contained in:
Kurt Hutten
2020-10-19 07:17:39 +11:00
parent f10e3aec8d
commit 9d59c18886
2 changed files with 14 additions and 6 deletions

View File

@@ -29,14 +29,11 @@ export const Success = ({ part }) => {
const { addMessage } = useFlash()
const [updatePart, { loading, error }] = useMutation(UPDATE_PART_MUTATION, {
onCompleted: () => {
navigate(routes.parts())
addMessage('Part updated.', { classes: 'rw-flash-success' })
},
})
const onSave = (input, id) => {
updatePart({ variables: { id, input } })
}
const onSave = (input, id) => updatePart({ variables: { id, input } })
return (
<PartForm part={part} onSave={onSave} error={error} loading={loading} />