mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
redux action infrastructure
This commit is contained in:
@@ -19,6 +19,7 @@ class Dashboard extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.handleViewSource = this.handleViewSource.bind(this)
|
||||
this.handleHighlight = this.handleHighlight.bind(this);
|
||||
this.handleSelect = this.handleSelect.bind(this);
|
||||
this.handleSelectNarrative = this.handleSelectNarrative.bind(this);
|
||||
@@ -46,6 +47,11 @@ class Dashboard extends React.Component {
|
||||
return this.eventsById[eventId];
|
||||
}
|
||||
|
||||
handleViewSource(source) {
|
||||
console.log('handleViewSource: to implement in Dashboard.jsx')
|
||||
this.props.actions.updateSource(source)
|
||||
}
|
||||
|
||||
handleSelect(selected) {
|
||||
if (selected) {
|
||||
let eventsToSelect = selected.map(event => this.getEventById(event.id));
|
||||
@@ -108,6 +114,7 @@ class Dashboard extends React.Component {
|
||||
: ''
|
||||
}
|
||||
<CardStack
|
||||
onViewSource={this.handleViewSource}
|
||||
onSelect={this.handleSelect}
|
||||
onHighlight={this.handleHighlight}
|
||||
onToggleCardstack={() => this.props.actions.updateSelected([])}
|
||||
|
||||
Reference in New Issue
Block a user