File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
packages/scratch-gui/src/containers Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,21 @@ class Cards extends React.Component {
3333 }
3434 }
3535 render ( ) {
36+ const props = {
37+ ...this . props ,
38+ // Assume user is offline and don't attempt to
39+ // download and show videos
40+ showVideos : this . props . platform !== PLATFORM . DESKTOP
41+ } ;
3642 return (
37- < CardsComponent { ...this . props } />
43+ < CardsComponent { ...props } />
3844 ) ;
3945 }
4046}
4147
4248Cards . propTypes = {
4349 locale : PropTypes . string . isRequired ,
50+ platform : PropTypes . oneOf ( Object . keys ( PLATFORM ) )
4451} ;
4552
4653const mapStateToProps = state => ( {
@@ -54,9 +61,7 @@ const mapStateToProps = state => ({
5461 isRtl : state . locales . isRtl ,
5562 locale : state . locales . locale ,
5663 dragging : state . scratchGui . cards . dragging ,
57- // Assume user is offline and don't attempt to
58- // download and show videos
59- showVideos : state . scratchGui . platform . platform !== PLATFORM . DESKTOP
64+ platform : state . scratchGui . platform . platform
6065} ) ;
6166
6267const mapDispatchToProps = dispatch => ( {
You can’t perform that action at this time.
0 commit comments