Skip to content

Commit

Permalink
fix: delete equipment makes animal disappear (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scarlett-Truong authored Jun 27, 2024
1 parent 49508bc commit 0f8df14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/app/store/reducers/case-thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,11 +701,11 @@ export const deleteEquipment =
if (res) {
// remove equipment from state
const {
cases: { equipment },
cases: { equipment, note, subject, reviewComplete },
} = getState();
const updatedEquipment = equipment?.filter((equipment) => equipment.id !== id);

dispatch(setCaseFile({ equipment: updatedEquipment }));
dispatch(setCaseFile({ equipment: updatedEquipment, note, subject, reviewComplete }));
ToggleSuccess(`Equipment has been deleted`);
} else {
ToggleError(`Unable to update equipment`);
Expand Down

0 comments on commit 0f8df14

Please sign in to comment.