@@ -8,14 +8,8 @@ import styled from 'styled-components';
8
8
// Imports to be Refactored
9
9
import { bindActionCreators } from 'redux' ;
10
10
11
- import * as FileActions from '../actions/files' ;
12
11
import * as IDEActions from '../actions/ide' ;
13
12
import * 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' ;
19
13
20
14
// Local Imports
21
15
import Editor from '../components/Editor' ;
@@ -182,12 +176,10 @@ MobileIDEView.propTypes = {
182
176
183
177
function mapStateToProps ( state ) {
184
178
return {
185
- files : state . files ,
186
179
selectedFile :
187
180
state . files . find ( file => file . isSelectedFile ) ||
188
181
state . files . find ( file => file . name === 'sketch.js' ) ||
189
182
state . files . find ( file => file . name !== 'root' ) ,
190
- htmlFile : getHTMLFile ( state . files ) ,
191
183
ide : state . ide ,
192
184
unsavedChanges : state . ide . unsavedChanges ,
193
185
preferences : state . preferences ,
@@ -198,15 +190,9 @@ function mapStateToProps(state) {
198
190
} ;
199
191
}
200
192
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 ) ;
211
197
212
198
export default withRouter ( connect ( mapStateToProps , mapDispatchToProps ) ( MobileIDEView ) ) ;
0 commit comments