mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
Working narrative feature minus getNarrativeLinks (need further clarification); working on modifying narrativise filters feature
This commit is contained in:
@@ -119,8 +119,9 @@ class Dashboard extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
// Broken for time being; need clarification on function
|
||||
getNarrativeLinks (event) {
|
||||
const narrative = this.props.domain.narratives.find(nv => nv.id === event.narrative)
|
||||
const narrative = this.props.narratives.find(nv => nv.id === event.narratives[0])
|
||||
if (narrative) return narrative.byId[event.id]
|
||||
return null
|
||||
}
|
||||
@@ -196,7 +197,7 @@ class Dashboard extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
const { narrative } = this.props.app
|
||||
const { narrative } = this.props.app.associations
|
||||
if (narrative === null) return
|
||||
|
||||
if (idx < narrative.steps.length && idx >= 0) {
|
||||
@@ -363,7 +364,8 @@ function mapDispatchToProps (dispatch) {
|
||||
export default connect(
|
||||
state => ({
|
||||
...state,
|
||||
narrativeIdx: selectors.selectNarrativeIdx(state)
|
||||
narrativeIdx: selectors.selectNarrativeIdx(state),
|
||||
narratives: selectors.selectNarratives(state)
|
||||
}),
|
||||
mapDispatchToProps
|
||||
)(Dashboard)
|
||||
|
||||
@@ -66,7 +66,6 @@ function FilterListPanel ({
|
||||
|
||||
function renderTree (filters) {
|
||||
const aggregatedFilterPaths = aggregatePaths(filters)
|
||||
console.info(aggregatedFilterPaths)
|
||||
return (
|
||||
<div>
|
||||
{Object.entries(aggregatedFilterPaths).map(filter => createNodeComponent(filter, 1))}
|
||||
|
||||
@@ -62,8 +62,8 @@ class Toolbar extends React.Component {
|
||||
return (
|
||||
<div className='panel-action action'>
|
||||
<button onClick={() => { this.goToNarrative(narr) }}>
|
||||
<p>{narr.label}</p>
|
||||
<p><small>{trimAndEllipse(narr.description, 120)}</small></p>
|
||||
<p>{narr.id}</p>
|
||||
<p><small>{trimAndEllipse(narr.desc, 120)}</small></p>
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user