Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87d8246

Browse files
committed
leverage selectors for stepActions
1 parent3f88cf1 commit87d8246

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

‎web-app/src/services/state/actions/editor.ts

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import*asCRfrom'typings'
2+
import*asselectorsfrom'../../selectors'
23
importchannelfrom'../../channel'
34

45
exportdefault{
5-
tutorialConfig(context:CR.MachineContext){
6+
initializeTutorial(context:CR.MachineContext){
67
// setup test runner and git
78
const{tutorial}=context
89
if(!tutorial){
@@ -29,13 +30,34 @@ export default {
2930
}
3031
})
3132
},
32-
loadLevel():void{
33-
// load step actions
33+
loadLevel(context:CR.MachineContext):void{
34+
constlevel=selectors.currentLevel(context)
35+
if(level.setup){
36+
// load step actions
37+
channel.editorSend({
38+
type:'STEP_ACTIONS',
39+
payload:level.setup,
40+
})
41+
}
3442
},
35-
loadStage():void{
36-
// load step actions
43+
loadStage(context:CR.MachineContext):void{
44+
conststage=selectors.currentStage(context)
45+
if(stage.setup){
46+
// load step actions
47+
channel.editorSend({
48+
type:'STEP_ACTIONS',
49+
payload:stage.setup,
50+
})
51+
}
3752
},
38-
loadStep():void{
39-
// load step actions
53+
loadStep(context:CR.MachineContext):void{
54+
conststep=selectors.currentStep(context)
55+
if(step.setup){
56+
// load step actions
57+
channel.editorSend({
58+
type:'STEP_ACTIONS',
59+
payload:step.setup,
60+
})
61+
}
4062
},
4163
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp