Skip to content

Commit 0e3b3a8

Browse files
committed
feat(treeCover): adjust Tree Cover value when plantations is false
1 parent 239e142 commit 0e3b3a8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/widgets/land-cover/tree-cover/selectors.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ export const parseData = createSelector(
2727
const parsedData = [
2828
{
2929
label: 'Tree Cover'.concat(label),
30-
value: hasPlantations ? plantationsCover : cover - plantationsCover,
30+
value: hasPlantations ? plantationsCover : cover,
3131
color: colors.naturalForest,
3232
percentage:
33-
((hasPlantations ? plantationsCover : cover - plantationsCover) /
34-
totalArea) *
35-
100,
33+
((hasPlantations ? plantationsCover : cover) / totalArea) * 100,
3634
},
3735
{
3836
label: 'Other Land Cover',

0 commit comments

Comments
 (0)