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

Commit33eb7ff

Browse files
committed
setup default selectors
1 parenta1f8922 commit33eb7ff

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export*from'./tutorial'
2-
export*from'./position'
2+
export*from'./position'
3+
export*from'./progress'

‎web-app/src/services/selectors/position.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import * as G from 'typings/graphql'
33
import*asCRfrom'typings'
44
import*astutorialfrom'./tutorial'
55

6+
exportconstdefaultPosition=()=>({
7+
levelId:'',
8+
stageId:'',
9+
stepId:''
10+
})
11+
612
exportconstinitialPosition=createSelector(
713
tutorial.currentVersion,
814
(version:G.TutorialVersion)=>{
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
exportconstdefaultProgress=()=>({
2+
levels:{},
3+
stages:{},
4+
steps:{},
5+
complete:false
6+
})

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,21 +228,12 @@ export default {
228228
returnnull
229229
},
230230
progress():CR.Progress{
231-
constprogress:CR.Progress={
232-
levels:{},
233-
stages:{},
234-
steps:{},
235-
complete:false
236-
}
231+
constprogress:CR.Progress=selectors.defaultProgress()
237232
storage.progress.set(progress)
238233
returnprogress
239234
},
240235
position():CR.Position{
241-
constposition:CR.Position={
242-
levelId:'',
243-
stageId:'',
244-
stepId:''
245-
}
236+
constposition:CR.Position=selectors.defaultPosition()
246237
storage.position.set(position)
247238
returnposition
248239
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp