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

Commit63fbbf7

Browse files
committed
remove unused actions
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent7340962 commit63fbbf7

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,6 @@ export const updateStepPosition = assign({
6060
},
6161
})
6262

63-
exportconstupdateLevelPosition=assign({
64-
position:(context:T.MachineContext):any=>{
65-
const{ position}=context
66-
consttutorial=selectors.currentTutorial(context)
67-
// merge in the updated position
68-
// sent with the test to ensure consistency
69-
constlevels:TT.Level[]=tutorial.levels
70-
71-
constlevelIndex=levels.findIndex((l:TT.Level)=>l.id===position.levelId)
72-
constlevel:TT.Level=levels[levelIndex+1]
73-
74-
constnextPosition:T.Position={
75-
levelId:level.id,
76-
stepId:level.steps.length ?level.steps[0].id :null,
77-
complete:!level.steps.length,
78-
}
79-
80-
returnnextPosition
81-
},
82-
})
83-
8463
exportconstupdatePosition=assign({
8564
position:(context:T.MachineContext,event:T.MachineEvent):any=>{
8665
returnevent.payload
@@ -90,6 +69,7 @@ export const updatePosition = assign({
9069
exportconstupdateLevel=assign({
9170
position:(context:T.MachineContext,event:T.MachineEvent):any=>{
9271
constlevelId=context.position.levelId
72+
console.log(`updateLevel:${JSON.stringify(context.position)}`)
9373
return{ levelId,complete:false}
9474
},
9575
})

‎web-app/src/services/state/machine.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,10 @@ export const createMachine = (options: any) => {
215215
},
216216
},
217217
LevelComplete:{
218-
onExit:['syncLevelPosition'],
218+
onExit:['testClear','syncLevelPosition'],
219219
on:{
220-
NEXT_LEVEL:{
221-
target:'LoadNext',
222-
actions:['testClear','updateLevel'],
223-
},
224-
KEY_PRESS_ENTER:{
225-
target:'LoadNext',
226-
actions:['testClear','updateLevel'],
227-
},
220+
NEXT_LEVEL:'LoadNext',
221+
KEY_PRESS_ENTER:'LoadNext',
228222
},
229223
},
230224
LoadNext:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp