From 0e3b3a86ea89db45077a56f20ddc36d35ef2549a Mon Sep 17 00:00:00 2001 From: Luis Zenteno Date: Sun, 15 Dec 2024 14:16:27 -0600 Subject: [PATCH] feat(treeCover): adjust Tree Cover value when plantations is false --- components/widgets/land-cover/tree-cover/selectors.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/widgets/land-cover/tree-cover/selectors.js b/components/widgets/land-cover/tree-cover/selectors.js index 7fb602b3b0..c7775e21c5 100644 --- a/components/widgets/land-cover/tree-cover/selectors.js +++ b/components/widgets/land-cover/tree-cover/selectors.js @@ -27,12 +27,10 @@ export const parseData = createSelector( const parsedData = [ { label: 'Tree Cover'.concat(label), - value: hasPlantations ? plantationsCover : cover - plantationsCover, + value: hasPlantations ? plantationsCover : cover, color: colors.naturalForest, percentage: - ((hasPlantations ? plantationsCover : cover - plantationsCover) / - totalArea) * - 100, + ((hasPlantations ? plantationsCover : cover) / totalArea) * 100, }, { label: 'Other Land Cover',