mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-16 07:18:35 +03:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user