🐛 répare la sauvegarde des données avec le nouvel état
parent
e111a2694f
commit
86ae5102e0
|
@ -20,7 +20,6 @@ import {
|
|||
targetNames: state.targetNames,
|
||||
conversationStarted: state.conversationStarted,
|
||||
themeColours: state.themeColours,
|
||||
foldedSteps: state.foldedSteps,
|
||||
flatRules: flatRulesSelector(state),
|
||||
currentQuestion: currentQuestionSelector(state)
|
||||
}))
|
||||
|
|
|
@ -8,7 +8,7 @@ const situationSelector: State => Situation = state =>
|
|||
export const currentSimulationSelector: State => SavedSimulation = state => ({
|
||||
situation: situationSelector(state),
|
||||
activeTargetInput: state.activeTargetInput,
|
||||
foldedSteps: state.foldedSteps
|
||||
foldedSteps: state.conversationSteps.foldedSteps
|
||||
})
|
||||
|
||||
export const createStateFromSavedSimulation: (
|
||||
|
@ -21,7 +21,9 @@ export const createStateFromSavedSimulation: (
|
|||
values: simulation.situation
|
||||
}
|
||||
},
|
||||
foldedSteps: simulation.foldedSteps,
|
||||
conversationSteps: {
|
||||
foldedSteps: simulation.foldedSteps
|
||||
},
|
||||
conversationStarted: true,
|
||||
previousSimulation: null
|
||||
}
|
||||
|
|
|
@ -24,7 +24,10 @@ export type State = {
|
|||
}
|
||||
},
|
||||
previousSimulation: ?SavedSimulation,
|
||||
foldedSteps: Array<string>,
|
||||
conversationSteps: {
|
||||
foldedSteps: Array<string>,
|
||||
currentQuestion: ?string
|
||||
},
|
||||
activeTargetInput: TargetInput,
|
||||
conversationStarted: boolean
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue