@@ -11,26 +11,23 @@ var Routes = (function (_super) {
1111 function Routes ( ) {
1212 _super . apply ( this , arguments ) ;
1313 }
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 ) {
1617 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 } ) ;
1819 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 } ) ;
2021 case 'start' :
21- return React . createElement ( _components_1 . Start , { checks : state . checks } ) ;
22+ return React . createElement ( _components_1 . Start , { checks : checks } ) ;
2223 case 'tutorials' :
23- return React . createElement ( _components_1 . Tutorials , { tutorials : state . tutorials } ) ;
24+ return React . createElement ( _components_1 . Tutorials , { tutorials : tutorials } ) ;
2425 case 'final' :
2526 return React . createElement ( _components_1 . FinalPage , null ) ;
2627 default :
2728 throw 'Error: Route not found.' ;
2829 }
2930 } ;
30- Routes . prototype . render = function ( ) {
31- var state = this . props . state ;
32- return ( React . createElement ( "div" , null , this . chooseRoute ( state ) ) ) ;
33- } ;
3431 return Routes ;
3532} ( React . Component ) ) ;
3633exports . Routes = Routes ;
0 commit comments