Beginning to remove extraneous components and logic

This commit is contained in:
efarooqui
2020-09-09 07:43:33 -07:00
parent c264071cdb
commit a1f7cf69d4
3 changed files with 17 additions and 16 deletions

View File

@@ -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>
)
}

View File

@@ -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}

View File

@@ -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)) {