File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 11export * from './tutorial'
2- export * from './position'
2+ export * from './position'
3+ export * from './progress'
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ import * as G from 'typings/graphql'
33import * as CR from 'typings'
44import * as tutorial from './tutorial'
55
6+ export const defaultPosition = ( ) => ( {
7+ levelId : '' ,
8+ stageId : '' ,
9+ stepId : ''
10+ } )
11+
612export const initialPosition = createSelector (
713 tutorial . currentVersion ,
814 ( version : G . TutorialVersion ) => {
Original file line number Diff line number Diff line change 1+ export const defaultProgress = ( ) => ( {
2+ levels : { } ,
3+ stages : { } ,
4+ steps : { } ,
5+ complete : false
6+ } )
Original file line number Diff line number Diff line change @@ -228,21 +228,12 @@ export default {
228228 return null
229229 } ,
230230 progress ( ) : CR . Progress {
231- const progress : CR . Progress = {
232- levels : { } ,
233- stages : { } ,
234- steps : { } ,
235- complete : false
236- }
231+ const progress : CR . Progress = selectors . defaultProgress ( )
237232 storage . progress . set ( progress )
238233 return progress
239234 } ,
240235 position ( ) : CR . Position {
241- const position : CR . Position = {
242- levelId : '' ,
243- stageId : '' ,
244- stepId : ''
245- }
236+ const position : CR . Position = selectors . defaultPosition ( )
246237 storage . position . set ( position )
247238 return position
248239 }
You can’t perform that action at this time.
0 commit comments