Skip to content

Commit

Permalink
Unique queryKey
Browse files Browse the repository at this point in the history
  • Loading branch information
amjithtitus09 committed Jan 6, 2025
1 parent 3180a7a commit 47b6dac
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ export function StructuredResponseView({
});

const symptomQuery = useQuery({
queryKey: ["symptom"],
queryKey: ["symptom", id],
queryFn: query(symptomApi.retrieveSymptom, getParams("symptomId")),
enabled: type === "symptom" && !!id,
});

const diagnosisQuery = useQuery({
queryKey: ["diagnosis"],
queryKey: ["diagnosis", id],
queryFn: query(diagnosisApi.retrieveDiagnosis, getParams("diagnosisId")),
enabled: type === "diagnosis" && !!id,
});

const allergyQuery = useQuery({
queryKey: ["allergy_intolerance"],
queryKey: ["allergy_intolerance", id],
queryFn: query(allergyApi.retrieveAllergy, getParams("allergyId")),
enabled: type === "allergy_intolerance" && !!id,
});
Expand Down

0 comments on commit 47b6dac

Please sign in to comment.