mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
narrative movement fully redux-ized
This commit is contained in:
@@ -33,15 +33,16 @@ class MapEvents extends React.Component {
|
||||
})
|
||||
|
||||
if (this.props.narrative) {
|
||||
// TODO: logic to display narratives in Map
|
||||
// const { byId } = this.props.narrative
|
||||
// const eventsInNarrative = events.filter(e => byId.hasOwnProperty(e.id))
|
||||
// if (eventsInNarrative.length <= 0) {
|
||||
// styleProps = {
|
||||
// ...styleProps,
|
||||
// fillOpacity: 0.1
|
||||
// }
|
||||
// }
|
||||
const { steps } = this.props.narrative
|
||||
const onlyIfInNarrative = e => steps.map(s => s.id).includes(e.id)
|
||||
const eventsInNarrative = events.filter(onlyIfInNarrative)
|
||||
|
||||
if (eventsInNarrative.length <= 0) {
|
||||
styleProps = {
|
||||
...styleProps,
|
||||
fillOpacity: 0.1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user