Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
LWangllix committed Oct 15, 2024
1 parent 551d938 commit dfeb1ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/ObservationForm/hooks/useData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const useData = () => {
},
);

const removeUser = useMutation(() => api.deleteObservationForm(id), {
const deleteForm = useMutation(() => api.deleteObservationForm(id), {
onError: () => {
handleErrorFromServerToast();
},
Expand All @@ -46,7 +46,7 @@ export const useData = () => {
deleteTitle: deleteTitles.form,
deleteName: `#${observationForm?.id}`,
deleteFunction:
observationForm?.status === StatusTypes.RETURNED ? removeUser.mutateAsync : undefined,
observationForm?.status === StatusTypes.RETURNED ? deleteForm.mutateAsync : undefined,
};

const disabled = !!observationForm && !observationForm?.canEdit;
Expand Down

0 comments on commit dfeb1ba

Please sign in to comment.