@@ -43,41 +43,13 @@ var default_1 = (function (_super) {
43
43
_super . call ( this ) ;
44
44
}
45
45
default_1 . prototype . componentDidUpdate = function ( ) {
46
- var _a = this . props , taskPosition = _a . taskPosition , hintPosition = _a . hintPosition , tasks = _a . tasks , page = _a . page ;
47
- if ( taskPosition > 0 && taskPosition < tasks . length ) {
48
- ReactDOM . findDOMNode ( this . refs . listEnd ) . scrollIntoView ( ) ;
49
- }
50
- if ( hintPosition > - 1 ) {
51
- ReactDOM . findDOMNode ( this . refs . listEnd ) . scrollIntoView ( ) ;
52
- }
53
- else if ( page . completed && page . onPageComplete ) {
54
- ReactDOM . findDOMNode ( this . refs . listEnd ) . scrollIntoView ( ) ;
55
- }
56
- } ;
57
- default_1 . prototype . displayHint = function ( task ) {
58
- var hintPosition = this . props . hintPosition ;
59
- if ( task && task . hints && task . hints . length ) {
60
- if ( hintPosition < task . hints . length - 1 ) {
61
- this . props . showHint ( hintPosition + 1 ) ;
62
- }
63
- }
64
- else {
65
- this . props . showHint ( - 1 ) ;
66
- }
46
+ ReactDOM . findDOMNode ( this . refs . listEnd ) . scrollIntoView ( ) ;
67
47
} ;
68
48
default_1 . prototype . render = function ( ) {
69
49
var _a = this . props , page = _a . page , taskPosition = _a . taskPosition , hintPosition = _a . hintPosition , tasks = _a . tasks , runTests = _a . runTests ;
70
50
var currentTask = taskPosition <= tasks . length ?tasks [ taskPosition ] :null ;
71
51
var allComplete = taskPosition >= tasks . length ;
72
- return ( React . createElement ( material_ui_2 . Paper , { style :style , zDepth :1 , className :'cr-page' } ,
73
- React . createElement ( content_1 . default , { page :page } ) ,
74
- React . createElement ( material_ui_1 . Divider , null ) ,
75
- React . createElement ( material_ui_1 . List , { subheader :'Tasks' , className :'cr-page-list' , ref :'tasks' } ,
76
- React . createElement ( task_1 . Tasks , { tasks :tasks , taskPosition :taskPosition , runTests :runTests } ) ,
77
- React . createElement ( hint_1 . TaskHints , { task :currentTask , hintPosition :hintPosition } ) ,
78
- React . createElement ( page_complete_1 . PageCompleteMessage , { page :page } ) ,
79
- React . createElement ( "div" , { ref :'listEnd' } ) ) ,
80
- React . createElement ( toolbar_1 . default , { tasks :tasks , taskPosition :taskPosition , hintPosition :hintPosition } ) ) ) ;
52
+ return ( React . createElement ( material_ui_2 . Paper , { style :style , zDepth :1 , className :'cr-page' } , React . createElement ( content_1 . default , { page :page } ) , React . createElement ( material_ui_1 . Divider , null ) , React . createElement ( material_ui_1 . List , { subheader :'Tasks' , className :'cr-page-list' , ref :'tasks' } , React . createElement ( task_1 . Tasks , { tasks :tasks , taskPosition :taskPosition , runTests :runTests } ) , React . createElement ( hint_1 . TaskHints , { task :currentTask , hintPosition :hintPosition } ) , React . createElement ( page_complete_1 . PageCompleteMessage , { page :page } ) , React . createElement ( "div" , { ref :'listEnd' } ) ) , React . createElement ( toolbar_1 . default , { tasks :tasks , taskPosition :taskPosition , hintPosition :hintPosition } ) ) ) ;
81
53
} ;
82
54
default_1 = __decorate ( [
83
55
react_redux_1 . connect ( null , function ( dispatch , state ) {