mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-08 03:18:36 +03:00
console logs removed and changes made
This commit is contained in:
@@ -247,7 +247,7 @@ export function updateNarrative (narrative) {
|
||||
}
|
||||
|
||||
export const UPDATE_NARRATIVE_STEP_IDX = 'UPDATE_NARRATIVE_STEP_IDX'
|
||||
export function selectNarrativeIdx (idx) {
|
||||
export function updateNarrativeStepIdx (idx) {
|
||||
return {
|
||||
type: UPDATE_NARRATIVE_STEP_IDX,
|
||||
idx
|
||||
|
||||
@@ -179,8 +179,6 @@ class Dashboard extends React.Component {
|
||||
selectNarrativeStep (idx) {
|
||||
// Try to find idx if event passed rather than number
|
||||
if (typeof idx !== 'number') {
|
||||
console.log('run')
|
||||
console.log(idx)
|
||||
let e = idx[0] || idx
|
||||
|
||||
if (this.props.app.narrative) {
|
||||
@@ -192,13 +190,10 @@ class Dashboard extends React.Component {
|
||||
|
||||
if (narrativeIdx > -1) {
|
||||
idx = narrativeIdx
|
||||
console.log(idx)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(idx)
|
||||
|
||||
const { narrative } = this.props.app
|
||||
if (narrative === null) return
|
||||
|
||||
@@ -206,7 +201,7 @@ class Dashboard extends React.Component {
|
||||
const step = narrative.steps[idx]
|
||||
|
||||
this.handleSelect([step])
|
||||
this.props.actions.selectNarrativeIdx(idx)
|
||||
this.props.actions.updateNarrativeStepIdx(idx)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,12 +98,10 @@ function updateNarrative (appState, action) {
|
||||
}
|
||||
|
||||
function updateNarrativeStepIdx (appState, action) {
|
||||
appState.narrativeState.current = action.idx
|
||||
|
||||
return {
|
||||
...appState,
|
||||
narrativeState: {
|
||||
current: appState.narrativeState.current
|
||||
current: action.idx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user