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

Commitf971eb0

Browse files
committed
simplify selectTutorial routes
1 parent0bfc65a commitf971eb0

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

‎typings/index.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,7 @@ export interface MachineStateSchema {
132132
Start:{
133133
states:{
134134
Startup:{}
135-
NewTutorial:{
136-
states:{
137-
SelectTutorial:{}
138-
InitializeTutorial:{}
139-
}
140-
}
135+
SelectTutorial:{}
141136
ContinueTutorial:{}
142137
}
143138
}

‎web-app/src/Routes.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ const Routes = () => {
4747
<Routepath="Start.Startup">
4848
<LoadingPagetext="Launching..."/>
4949
</Route>
50-
<Routepath="Start.NewTutorial.SelectTutorial">
50+
<Routepath="Start.SelectTutorial">
5151
<NewPagesend={tempSend}/>
5252
</Route>
53-
<Routepath="Start.NewTutorial.InitializeTutorial">
54-
<LoadingPagetext="Launching Tutorial..."/>
55-
</Route>
5653
<Routepath="Start.ContinueTutorial">
5754
<ContinuePagesend={tempSend}context={{}asCR.MachineContext}/>
5855
</Route>

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

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,21 @@ export const machine = Machine<CR.MachineContext, CR.MachineStateSchema, CR.Mach
3434
target:'ContinueTutorial',
3535
actions:['continueTutorial']
3636
},
37-
onError:'NewTutorial'
37+
onError:'SelectTutorial'
3838
},
3939
},
40-
NewTutorial:{
40+
SelectTutorial:{
4141
id:'start-new-tutorial',
42-
initial:'SelectTutorial',
43-
states:{
44-
SelectTutorial:{
45-
on:{
46-
TUTORIAL_START:{
47-
target:'InitializeTutorial',
48-
actions:['setTutorial'],
49-
},
50-
},
51-
},
52-
InitializeTutorial:{
53-
on:{
54-
TUTORIAL_LOADED:'#tutorial',
55-
},
42+
on:{
43+
TUTORIAL_START:{
44+
target:'#tutorial',
45+
actions:['setTutorial'],
5646
},
5747
},
5848
},
5949
ContinueTutorial:{
6050
on:{
61-
TUTORIAL_START:'#tutorial-stage',
51+
TUTORIAL_START:'#tutorial',
6252
},
6353
},
6454
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp