@@ -8,14 +8,8 @@ import styled from 'styled-components';
88// Imports to be Refactored
99import { bindActionCreators } from 'redux' ;
1010
11- import * as FileActions from '../actions/files' ;
1211import * as IDEActions from '../actions/ide' ;
1312import * as ProjectActions from '../actions/project' ;
14- import * as PreferencesActions from '../actions/preferences' ;
15- import * as UserActions from '../../User/actions' ;
16- import * as ToastActions from '../actions/toast' ;
17- import * as ConsoleActions from '../actions/console' ;
18- import { getHTMLFile } from '../reducers/files' ;
1913
2014// Local Imports
2115import Editor from '../components/Editor' ;
@@ -182,12 +176,10 @@ MobileIDEView.propTypes = {
182176
183177function mapStateToProps ( state ) {
184178 return {
185- files : state . files ,
186179 selectedFile :
187180 state . files . find ( file => file . isSelectedFile ) ||
188181 state . files . find ( file => file . name === 'sketch.js' ) ||
189182 state . files . find ( file => file . name !== 'root' ) ,
190- htmlFile : getHTMLFile ( state . files ) ,
191183 ide : state . ide ,
192184 unsavedChanges : state . ide . unsavedChanges ,
193185 preferences : state . preferences ,
@@ -198,15 +190,9 @@ function mapStateToProps(state) {
198190 } ;
199191}
200192
201- function mapDispatchToProps ( dispatch ) {
202- return bindActionCreators (
203- Object . assign (
204- { } ,
205- ProjectActions ,
206- IDEActions ,
207- ) ,
208- dispatch
209- ) ;
210- }
193+ const mapDispatchToProps = dispatch => bindActionCreators ( {
194+ ...ProjectActions ,
195+ ...IDEActions
196+ } , dispatch ) ;
211197
212198export default withRouter ( connect ( mapStateToProps , mapDispatchToProps ) ( MobileIDEView ) ) ;
0 commit comments