Skip to content

Commit

Permalink
update usequery
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahendar0701 committed Dec 28, 2024
1 parent 3a8a119 commit 04852b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Patient/ShiftCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Shifting/ReferralLetter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }),
});

Expand Down
4 changes: 2 additions & 2 deletions src/components/Shifting/ShiftDetailsUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}),
Expand Down Expand Up @@ -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 },
}),
Expand Down

0 comments on commit 04852b4

Please sign in to comment.