@@ -154,7 +154,7 @@ class MenuBar extends React.Component {
154
154
'handleKeyPress' ,
155
155
'handleLanguageMouseUp' ,
156
156
'handleRestoreOption' ,
157
- 'handleSaveToComputer ' ,
157
+ 'getSaveToComputerHandler ' ,
158
158
'restoreOptionMessage'
159
159
] ) ;
160
160
}
@@ -225,7 +225,7 @@ class MenuBar extends React.Component {
225
225
event . preventDefault ( ) ;
226
226
}
227
227
}
228
- handleSaveToComputer ( downloadProjectCallback ) {
228
+ getSaveToComputerHandler ( downloadProjectCallback ) {
229
229
return ( ) => {
230
230
this . props . onRequestCloseFile ( ) ;
231
231
downloadProjectCallback ( ) ;
@@ -327,7 +327,7 @@ class MenuBar extends React.Component {
327
327
[ styles . clickable ] : typeof this . props . onClickLogo !== 'undefined'
328
328
} ) }
329
329
draggable = { false }
330
- src = { this . props . logo ? this . props . logo : scratchLogo }
330
+ src = { this . props . logo }
331
331
onClick = { this . props . onClickLogo }
332
332
/>
333
333
</ div >
@@ -374,21 +374,21 @@ class MenuBar extends React.Component {
374
374
</ MenuSection >
375
375
{ ( this . props . canSave || this . props . canCreateCopy || this . props . canRemix ) && (
376
376
< MenuSection >
377
- { this . props . canSave ? (
377
+ { this . props . canSave && (
378
378
< MenuItem onClick = { this . handleClickSave } >
379
379
{ saveNowMessage }
380
380
</ MenuItem >
381
- ) : [ ] }
382
- { this . props . canCreateCopy ? (
381
+ ) }
382
+ { this . props . canCreateCopy && (
383
383
< MenuItem onClick = { this . handleClickSaveAsCopy } >
384
384
{ createCopyMessage }
385
385
</ MenuItem >
386
- ) : [ ] }
387
- { this . props . canRemix ? (
386
+ ) }
387
+ { this . props . canRemix && (
388
388
< MenuItem onClick = { this . handleClickRemix } >
389
389
{ remixMessage }
390
390
</ MenuItem >
391
- ) : [ ] }
391
+ ) }
392
392
</ MenuSection >
393
393
) }
394
394
< MenuSection >
@@ -397,10 +397,10 @@ class MenuBar extends React.Component {
397
397
userOwnsProject = { this . props . userOwnsProject }
398
398
onUpdateProjectTitle = { this . props . onUpdateProjectTitle }
399
399
>
400
- { ( className , renderFileInput , loadProject ) => (
400
+ { ( className , renderFileInput , handleLoadProject ) => (
401
401
< MenuItem
402
402
className = { className }
403
- onClick = { loadProject }
403
+ onClick = { handleLoadProject }
404
404
>
405
405
{ /* eslint-disable max-len */ }
406
406
{ this . props . intl . formatMessage ( sharedMessages . loadFromComputerTitle ) }
@@ -412,7 +412,7 @@ class MenuBar extends React.Component {
412
412
< SB3Downloader > { ( className , downloadProjectCallback ) => (
413
413
< MenuItem
414
414
className = { className }
415
- onClick = { this . handleSaveToComputer ( downloadProjectCallback ) }
415
+ onClick = { this . getSaveToComputerHandler ( downloadProjectCallback ) }
416
416
>
417
417
< FormattedMessage
418
418
defaultMessage = "Save to your computer"
@@ -758,6 +758,7 @@ MenuBar.propTypes = {
758
758
} ;
759
759
760
760
MenuBar . defaultProps = {
761
+ logo : scratchLogo ,
761
762
onShare : ( ) => { }
762
763
} ;
763
764
0 commit comments