From 272662e489d19d5eb455d57cbb61b41cff0fcaf7 Mon Sep 17 00:00:00 2001 From: Luis Zenteno Date: Tue, 27 Aug 2024 16:09:50 -0600 Subject: [PATCH] (helpers): add isWdpaArea check on shouldQueryPrecomputedTables function --- components/widgets/utils/helpers.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/widgets/utils/helpers.js b/components/widgets/utils/helpers.js index 6d718e5917..81564c2825 100644 --- a/components/widgets/utils/helpers.js +++ b/components/widgets/utils/helpers.js @@ -1,8 +1,10 @@ -const isAreaComputed = status => status === 'saved'; -const isGlobalArea = type => type === 'global'; -const isCountryArea = type => type === 'country'; +const isAreaComputed = (status) => status === 'saved'; +const isGlobalArea = (type) => type === 'global'; +const isCountryArea = (type) => type === 'country'; +const isWdpaArea = (type) => type === 'wdpa'; -export const shouldQueryPrecomputedTables = params => +export const shouldQueryPrecomputedTables = (params) => isAreaComputed(params.status) || isGlobalArea(params.type) || - isCountryArea(params.type); + isCountryArea(params.type) || + isWdpaArea(params.type);