@@ -11,26 +11,23 @@ var Routes = (function (_super) {
11
11
function Routes ( ) {
12
12
_super . apply ( this , arguments ) ;
13
13
}
14
- Routes . prototype . chooseRoute = function ( state ) {
15
- switch ( state . route ) {
14
+ Routes . prototype . render = function ( ) {
15
+ var _a = this . props . state , page = _a . page , tasks = _a . tasks , taskPosition = _a . taskPosition , hintPosition = _a . hintPosition , editorActions = _a . editorActions , testRun = _a . testRun , log = _a . log , progress = _a . progress , position = _a . position , checks = _a . checks , tutorials = _a . tutorials , route = _a . route ;
16
+ switch ( route ) {
16
17
case 'page' :
17
- return React . createElement ( _components_1 . Page , { page :state . page , tasks :state . tasks , taskPosition :state . taskPosition , hintPosition :state . hintPosition , editorActions :state . editorActions , testRun :state . testRun , log : state . log } ) ;
18
+ return React . createElement ( _components_1 . Page , { page :page , tasks :tasks , taskPosition :taskPosition , hintPosition :hintPosition , editorActions :editorActions , testRun :testRun } ) ;
18
19
case 'progress' :
19
- return React . createElement ( _components_1 . Progress , { progress :state . progress , position :state . position } ) ;
20
+ return React . createElement ( _components_1 . Progress , { progress :progress , position :position } ) ;
20
21
case 'start' :
21
- return React . createElement ( _components_1 . Start , { checks :state . checks } ) ;
22
+ return React . createElement ( _components_1 . Start , { checks :checks } ) ;
22
23
case 'tutorials' :
23
- return React . createElement ( _components_1 . Tutorials , { tutorials :state . tutorials } ) ;
24
+ return React . createElement ( _components_1 . Tutorials , { tutorials :tutorials } ) ;
24
25
case 'final' :
25
26
return React . createElement ( _components_1 . FinalPage , null ) ;
26
27
default :
27
28
throw 'Error: Route not found.' ;
28
29
}
29
30
} ;
30
- Routes . prototype . render = function ( ) {
31
- var state = this . props . state ;
32
- return ( React . createElement ( "div" , null , this . chooseRoute ( state ) ) ) ;
33
- } ;
34
31
return Routes ;
35
32
} ( React . Component ) ) ;
36
33
exports . Routes = Routes ;