Skip to content

Commit

Permalink
adds georegions param
Browse files Browse the repository at this point in the history
  • Loading branch information
agnlez committed Mar 12, 2024
1 parent 64c1ebf commit b2b85fb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type BreakdownItem from '../breakdown-item';
const DeforestationFreeSuppliersBreakdown = () => {
const {
viewBy,
filters: { dates, suppliers, origins, materials },
filters: { dates, suppliers, origins, materials, plots },
} = useAppSelector(eudr);

const { data } = useEUDRData(
Expand All @@ -24,6 +24,7 @@ const DeforestationFreeSuppliersBreakdown = () => {
producerIds: suppliers?.map(({ value }) => value),
materialIds: materials?.map(({ value }) => value),
originIds: origins?.map(({ value }) => value),
geoRegiondIds: plots?.map(({ value }) => value),
},
{
select: (data) => data?.breakDown,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type BreakdownItem from '../breakdown-item';
const SuppliersWithDeforestationAlertsBreakdown = () => {
const {
viewBy,
filters: { dates, suppliers, origins, materials },
filters: { dates, suppliers, origins, materials, plots },
} = useAppSelector(eudr);

const { data } = useEUDRData(
Expand All @@ -24,6 +24,7 @@ const SuppliersWithDeforestationAlertsBreakdown = () => {
producerIds: suppliers?.map(({ value }) => value),
materialIds: materials?.map(({ value }) => value),
originIds: origins?.map(({ value }) => value),
geoRegiondIds: plots?.map(({ value }) => value),
},
{
select: (data) => data?.breakDown,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type BreakdownItem from '../breakdown-item';
const SuppliersWithNoLocationDataBreakdown = () => {
const {
viewBy,
filters: { dates, suppliers, origins, materials },
filters: { dates, suppliers, origins, materials, plots },
} = useAppSelector(eudr);

const { data } = useEUDRData(
Expand All @@ -24,6 +24,7 @@ const SuppliersWithNoLocationDataBreakdown = () => {
producerIds: suppliers?.map(({ value }) => value),
materialIds: materials?.map(({ value }) => value),
originIds: origins?.map(({ value }) => value),
geoRegiondIds: plots?.map(({ value }) => value),
},
{
select: (data) => data?.breakDown,
Expand Down
3 changes: 2 additions & 1 deletion client/src/containers/analysis-eudr/category-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const CategoryList = (): JSX.Element => {

const {
viewBy,
filters: { dates, suppliers, origins, materials },
filters: { dates, suppliers, origins, materials, plots },
} = useAppSelector(eudr);

const { data } = useEUDRData(
Expand All @@ -52,6 +52,7 @@ export const CategoryList = (): JSX.Element => {
producerIds: suppliers?.map(({ value }) => value),
materialIds: materials?.map(({ value }) => value),
originIds: origins?.map(({ value }) => value),
geoRegiondIds: plots?.map(({ value }) => value),
},
{
select: (data) => data?.breakDown,
Expand Down
1 change: 1 addition & 0 deletions client/src/hooks/eudr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export const useEUDRData = <T = unknown>(
producerIds?: string[];
materialIds?: string[];
originIds?: string[];
geoRegiondIds?: string[];
},
options: UseQueryOptions<EUDRData, unknown, T> = {},
) => {
Expand Down

0 comments on commit b2b85fb

Please sign in to comment.