Skip to content

Commit

Permalink
Add in queryKey for some react query requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrucs committed Jul 18, 2024
1 parent 5751e8e commit 122258c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Map/hooks/usePopupResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const usePopupResult = (id: string, shouldFetch: boolean, type: ContentTy
};

const { data: trekPopupResult, isLoading } = useQuery<PopupResult, Error>({
queryKey: ['popupResult', id, language],
queryKey: ['popupResult', type, id, language],
queryFn: fetchData,
enabled: type !== null && shouldFetch && commonDictionaries !== undefined,
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Map/hooks/useTrekGeometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const useObjectGeometry = (
};

const { data: trekGeometry } = useQuery<GeometryObject, Error>({
queryKey: ['trekPopupResult', id, language],
queryKey: ['trekPopupResult', type, id, language],
queryFn: () => func()(String(id), language),
});

Expand Down

0 comments on commit 122258c

Please sign in to comment.