mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
categoryGroups removed
This commit is contained in:
@@ -147,6 +147,14 @@ class Dashboard extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Viewport
|
||||
methods={{
|
||||
select: this.handleSelect,
|
||||
highlight: this.handleHighlight,
|
||||
// getCategoryGroup: category => this.getCategoryGroup(category),
|
||||
getCategoryColor: category => this.getCategoryColor(category)
|
||||
}}
|
||||
/>
|
||||
<Toolbar
|
||||
filter={this.handleTagFilter}
|
||||
toggle={ (key) => this.handleToggle(key) }
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
import React from 'react';
|
||||
import Map from '../js/map/map.js';
|
||||
import { areEqual } from '../js/data/utilities.js';
|
||||
import React from 'react'
|
||||
import { connect } from 'react-redux'
|
||||
import * as selectors from '../selectors'
|
||||
import Map from '../js/map/map.js'
|
||||
import { areEqual } from '../js/data/utilities.js'
|
||||
|
||||
class Viewport extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
super(props)
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.map = new Map(this.props.app, this.props.ui, this.props.methods);
|
||||
this.map.update(this.props.domain, this.props.app);
|
||||
this.map = new Map(this.props.app, this.props.ui, this.props.methods)
|
||||
this.map.update(this.props.domain, this.props.app)
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
this.map.update(nextProps.domain, nextProps.app);
|
||||
this.map.update(nextProps.domain, nextProps.app)
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -21,8 +23,30 @@ class Viewport extends React.Component {
|
||||
<div className='map-wrapper'>
|
||||
<div id="map" />
|
||||
</div>
|
||||
);
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Viewport;
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
domain: {
|
||||
locations: selectors.selectLocations(state),
|
||||
narratives: selectors.selectNarratives(state),
|
||||
categories: selectors.selectCategories(state),
|
||||
sites: selectors.getSites(state)
|
||||
},
|
||||
app: {
|
||||
views: state.app.filters.views,
|
||||
selected: state.app.selected,
|
||||
highlighted: state.app.highlighted,
|
||||
mapAnchor: state.app.mapAnchor
|
||||
},
|
||||
ui: {
|
||||
dom: state.ui.dom,
|
||||
narratives: state.ui.style.narratives,
|
||||
categories: state.ui.style.narratives
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Viewport)
|
||||
|
||||
Reference in New Issue
Block a user