8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 893eca7 commit 5d0abd6Copy full SHA for 5d0abd6
src/state/actions/index.ts
@@ -164,9 +164,18 @@ export default {
164
return nextProgress
165
}
166
}),
167
- stepLoadNext() {
168
- console.log("LOAD NEXT STEP")
169
- },
+ stepLoadNext: assign({
+ position: (context: any) => {
+ const { data, position } = context
170
+ const { stepList } = data.stages[position.stageId]
171
+ const currentStepIndex = stepList.indexOf(position.stepId)
172
+ const nextStepId = stepList[currentStepIndex + 1]
173
+ return {
174
+ ...context.position,
175
+ stepId: nextStepId,
176
+ }
177
178
+ }),
179
loadLevel() {
180
console.log('loadLevel')
181
},
0 commit comments