reduce duplicate fetches after saving inventory group

This commit is contained in:
Keith J. Grant
2021-11-09 10:16:00 -08:00
parent ddc428532f
commit e89037dd77

View File

@@ -13,14 +13,14 @@ function InventoryGroupEdit({ inventoryGroup }) {
const handleSubmit = async (values) => { const handleSubmit = async (values) => {
try { try {
await GroupsAPI.update(groupId, values); await GroupsAPI.update(groupId, values);
history.push(`/inventories/inventory/${id}/groups/${groupId}`); history.push(`/inventories/inventory/${id}/groups/${groupId}/details`);
} catch (err) { } catch (err) {
setError(err); setError(err);
} }
}; };
const handleCancel = () => { const handleCancel = () => {
history.push(`/inventories/inventory/${id}/groups/${groupId}`); history.push(`/inventories/inventory/${id}/groups/${groupId}/details`);
}; };
return ( return (