mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-08 03:18:36 +03:00
Beginning to remove extraneous components and logic
This commit is contained in:
@@ -108,7 +108,7 @@ class Card extends React.Component {
|
||||
}
|
||||
|
||||
renderNarrative () {
|
||||
const links = this.props.getNarrativeLinks(this.props.event)
|
||||
// const links = this.props.getNarrativeLinks(this.props.event)
|
||||
|
||||
if (links !== null) {
|
||||
return (
|
||||
@@ -148,9 +148,9 @@ class Card extends React.Component {
|
||||
renderExtra () {
|
||||
return (
|
||||
<div className='card-bottomhalf'>
|
||||
{this.renderFilters()}
|
||||
{/* {this.renderFilters()} */}
|
||||
{this.renderSources()}
|
||||
{this.renderNarrative()}
|
||||
{/* {this.renderNarrative()} */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class CardStack extends React.Component {
|
||||
language={this.props.language}
|
||||
isLoading={this.props.isLoading}
|
||||
isSelected={selections[idx]}
|
||||
getNarrativeLinks={this.props.getNarrativeLinks}
|
||||
// getNarrativeLinks={this.props.getNarrativeLinks}
|
||||
getCategoryGroup={this.props.getCategoryGroup}
|
||||
getCategoryColor={this.props.getCategoryColor}
|
||||
getCategoryLabel={this.props.getCategoryLabel}
|
||||
|
||||
@@ -143,20 +143,21 @@ class Dashboard extends React.Component {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.props.features.USE_ASSOCIATION_DESCRIPTIONS) {
|
||||
activeFilters = activeFilters.reduce((acc, vl) => {
|
||||
acc.push({
|
||||
name: vl,
|
||||
description: findDescriptionInFilterTree(vl, domain.filters)
|
||||
})
|
||||
return acc
|
||||
}, [])
|
||||
} else {
|
||||
activeFilters = activeFilters.map(f => ({ name: f }))
|
||||
}
|
||||
// if (this.props.features.USE_ASSOCIATION_DESCRIPTIONS) {
|
||||
// activeFilters = activeFilters.reduce((acc, vl) => {
|
||||
// acc.push({
|
||||
// name: vl,
|
||||
// description: findDescriptionInFilterTree(vl, domain.filters)
|
||||
// })
|
||||
// return acc
|
||||
// }, [])
|
||||
// } else {
|
||||
// activeFilters = activeFilters.map(f => ({ name: f }))
|
||||
// }
|
||||
activeFilters = activeFilters.map(f => ({ name: f }))
|
||||
|
||||
const evs = domain.events.filter(ev => {
|
||||
let hasOne = false
|
||||
let hasOne = false
|
||||
// add event if it has at least one matching filter
|
||||
for (let i = 0; i < activeFilters.length; i++) {
|
||||
if (ev.filters.includes(activeFilters[i].name)) {
|
||||
|
||||
Reference in New Issue
Block a user