File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ import SelectTutorialPage from './containers/SelectTutorial'
88import CompletedPage from './containers/Tutorial/CompletedPage'
99import TutorialPage from './containers/Tutorial'
1010
11+ /*
12+ * NOTE: due to a lack of URLs and a dependency on xstate
13+ * we have to implement a custom router here
14+ */
1115const Routes = ( ) => {
1216 const { context, route, send } = useStateMachine ( )
1317
@@ -35,7 +39,7 @@ const Routes = () => {
3539 < Route paths = { { Tutorial : { Level : { Load : true } } } } >
3640 < LoadingPage text = "Loading Level..." processes = { context . processes } />
3741 </ Route >
38- < Route paths = { { Tutorial : { LoadNext : true , Level : true } } } >
42+ < Route paths = { { Tutorial : { Level : true } } } >
3943 < TutorialPage send = { send } context = { context } />
4044 </ Route >
4145 { /* Completed */ }
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ const matches = (route: string, paths: object): boolean => {
1515 for ( const key of keys ) {
1616 const next = current [ key ]
1717 if ( next ) {
18+ // exit early if property value is true
19+ if ( next === true ) {
20+ return true
21+ }
1822 current = next
1923 continue
2024 } else {
You can’t perform that action at this time.
0 commit comments