File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -349,9 +349,7 @@ GUIComponent.propTypes = {
349349 onToggleLoginOpen : PropTypes . func ,
350350 onUpdateProjectTitle : PropTypes . func ,
351351 renderLogin : PropTypes . func ,
352- rubyCode : PropTypes . shape ( {
353- rubyCode : PropTypes . string
354- } ) ,
352+ rubyCode : PropTypes . string ,
355353 rubyTabVisible : PropTypes . bool ,
356354 soundsTabVisible : PropTypes . bool ,
357355 stageSizeMode : PropTypes . oneOf ( Object . keys ( STAGE_SIZE_MODES ) ) ,
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ const mapStateToProps = state => ({
109109 soundsTabVisible : state . scratchGui . editorTab . activeTabIndex === SOUNDS_TAB_INDEX ,
110110 tipsLibraryVisible : state . scratchGui . modals . tipsLibrary ,
111111 rubyTabVisible : state . scratchGui . editorTab . activeTabIndex === RUBY_TAB_INDEX ,
112- rubyCode : state . scratchGui . rubyCode ,
112+ rubyCode : state . scratchGui . rubyCode . code ,
113113 vm : state . scratchGui . vm
114114} ) ;
115115
Original file line number Diff line number Diff line change @@ -19,15 +19,13 @@ const RubyTab = ({rubyCode}) => (
1919 showInvisibles : true
2020 } }
2121 theme = "clouds"
22- value = { rubyCode . rubyCode }
22+ value = { rubyCode }
2323 width = "100%"
2424 />
2525) ;
2626
2727RubyTab . propTypes = {
28- rubyCode : PropTypes . shape ( {
29- rubyCode : PropTypes . string
30- } )
28+ rubyCode : PropTypes . string
3129} ;
3230
3331export default RubyTab ;
Original file line number Diff line number Diff line change 11const UPDATE_RUBYCODE = 'smalruby3-gui/navigation/UPDATE_RUBYCODE' ;
22
33const initialState = {
4- rubyCode : ''
4+ code : ''
55} ;
66
77const reducer = function ( state , action ) {
88 if ( typeof state === 'undefined' ) state = initialState ;
99 switch ( action . type ) {
1010 case UPDATE_RUBYCODE :
1111 return {
12- rubyCode : action . rubyCode
12+ code : action . code
1313 } ;
1414 default :
1515 return state ;
@@ -19,7 +19,7 @@ const reducer = function (state, action) {
1919const updateRubyCode = function ( code ) {
2020 return {
2121 type : UPDATE_RUBYCODE ,
22- rubyCode : code
22+ code : code
2323 } ;
2424} ;
2525
You can’t perform that action at this time.
0 commit comments