diff --git a/src/components/Patient/ShiftCreate.tsx b/src/components/Patient/ShiftCreate.tsx index 39e32ae0b34..15c9df321f9 100644 --- a/src/components/Patient/ShiftCreate.tsx +++ b/src/components/Patient/ShiftCreate.tsx @@ -112,7 +112,7 @@ export const ShiftCreate = (props: patientShiftProps) => { }; const { data: patientData } = useQuery({ - queryKey: [routes.getPatient.path, patientId], + queryKey: ["getPatient", patientId], queryFn: query(routes.getPatient, { pathParams: { id: patientId }, }), diff --git a/src/components/Shifting/ReferralLetter.tsx b/src/components/Shifting/ReferralLetter.tsx index 5282c1575ac..b437ad162b9 100644 --- a/src/components/Shifting/ReferralLetter.tsx +++ b/src/components/Shifting/ReferralLetter.tsx @@ -21,7 +21,7 @@ interface ReferralLetterProps { } export const ReferralLetter = ({ id }: ReferralLetterProps) => { const { data, isLoading } = useQuery({ - queryKey: [routes.getShiftDetails.path, id], + queryKey: ["getShiftDetails", id], queryFn: query(routes.getShiftDetails, { pathParams: { id } }), }); diff --git a/src/components/Shifting/ShiftDetailsUpdate.tsx b/src/components/Shifting/ShiftDetailsUpdate.tsx index b193397483c..c97ac63fea6 100644 --- a/src/components/Shifting/ShiftDetailsUpdate.tsx +++ b/src/components/Shifting/ShiftDetailsUpdate.tsx @@ -155,7 +155,7 @@ export const ShiftDetailsUpdate = (props: patientShiftProps) => { } const { data, isLoading: assignedUserLoading } = useQuery({ - queryKey: [routes.userList.path, state.form.assigned_to], + queryKey: ["userList", state.form.assigned_to], queryFn: query(routes.userList, { queryParams: { id: state.form.assigned_to }, }), @@ -290,7 +290,7 @@ export const ShiftDetailsUpdate = (props: patientShiftProps) => { }; const { data: shiftDetailsData } = useQuery({ - queryKey: [routes.getShiftDetails.path, props.id], + queryKey: ["getShiftDetails", props.id], queryFn: query(routes.getShiftDetails, { pathParams: { id: props.id }, }),