mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
Remove unnecessary renders in map / timeline and style narrative mode
This commit is contained in:
committed by
Lachlan Kermode
parent
3e9b621655
commit
0bc4ddc54e
@@ -26,6 +26,7 @@ class NarrativeCard extends React.Component {
|
||||
componentDidUpdate() {
|
||||
if (this.props.narrative !== null) {
|
||||
const step = this.props.narrative.steps[this.state.step];
|
||||
console.log(step)
|
||||
this.props.onSelect([step]);
|
||||
}
|
||||
}
|
||||
@@ -34,7 +35,7 @@ class NarrativeCard extends React.Component {
|
||||
return (
|
||||
<button
|
||||
className="side-menu-burg is-active"
|
||||
onClick={() => { this.props.actions.updateNarrative(null); }}
|
||||
onClick={() => { this.props.onSelectNarrative(null); }}
|
||||
>
|
||||
<span></span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user