Deprecated usage of env constants USE_ASSOCIATION_DESCRIPTIONS, USE_NARRATIVESand FILTERS_AS_NARRATIVES to instead check for existence of narratives; deprecated usage of unused components such as CardFilters, CardNarrative, and NarrativeLink

This commit is contained in:
efarooqui
2020-09-09 20:38:11 -07:00
parent a1f7cf69d4
commit 10e905afeb
9 changed files with 14 additions and 111 deletions

View File

@@ -26,6 +26,8 @@ function MapNarratives ({
return styles[styleName]
}
const narrativesExist = narratives && narratives.length !== 0
function hasNoLocation (step) {
return (step.latitude === '' || step.longitude === '')
}
@@ -141,7 +143,7 @@ function MapNarratives ({
let lastMarked = null
if (features.FILTERS_AS_NARRATIVES) {
if (narrativesExist) {
for (let idx = 0; idx < n.steps.length; idx += 1) {
const step = n.steps[idx]
if (lastMarked) {
@@ -174,7 +176,7 @@ function MapNarratives ({
function renderNarrative (n) {
const narrativeId = `narrative-${n.id.replace(/ /g, '_')}`
const body = features.FILTERS_AS_NARRATIVES
const body = narrativesExist
? renderBetweenMarked(n)
: (features.NARRATIVE_STEP_STYLES
? renderBetweenMarked(n)