diff --git a/client/src/pages/patients/useDeletePatient.jsx b/client/src/pages/patients/useDeletePatient.jsx index f7006978..bc6ca78b 100644 --- a/client/src/pages/patients/useDeletePatient.jsx +++ b/client/src/pages/patients/useDeletePatient.jsx @@ -5,12 +5,13 @@ import LifelineAPI from './LifelineAPI'; * * @returns {{ * mutate: (patientId: string) => Promise + * isPending: boolean * }} */ export function useDeletePatient() { const queryClient = useQueryClient(); - const { mutate } = useMutation({ + const { mutateAsync, isPending } = useMutation({ mutationKey: ['deletePatient'], mutationFn: async (patientId) => { const res = await LifelineAPI.deletePatient(patientId); @@ -28,5 +29,5 @@ export function useDeletePatient() { }, }); - return { mutate }; + return { mutateAsync, isPending }; }