Skip to content

Commit

Permalink
MAUI-1059 Lesmis fetch by entity not country (#4121)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
  • Loading branch information
IgorNadj and avaek authored Sep 4, 2022
1 parent 39aa814 commit 9cfd2d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/lesmis/src/api/queries/useMapOverlayReportData.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { useEntitiesData } from './useEntitiesData';
import { yearToApiDates } from './utils';
import { useUrlSearchParam } from '../../utils/useUrlSearchParams';
import { useMapOverlaysData, findOverlay } from './useMapOverlaysData';
import { COUNTRY_CODE } from '../../constants';
import { get } from '../api';

const getMeasureDataFromResponse = (overlay, measureDataResponse) => {
Expand Down Expand Up @@ -156,9 +155,9 @@ export const useMapOverlayReportData = ({ entityCode, year }) => {
};

const { data: measureDataResponse, isLoading: measureDataLoading } = useQuery(
['mapOverlay', COUNTRY_CODE, selectedOverlay, params],
['mapOverlay', entityCode, selectedOverlay, params],
() =>
get(`report/${COUNTRY_CODE}/${reportCode}`, {
get(`report/${entityCode}/${reportCode}`, {
params,
}),
{
Expand Down

0 comments on commit 9cfd2d7

Please sign in to comment.