import React from 'react' import Editor from '../components/Editor' import PreviewFrame from '../components/PreviewFrame' import Toolbar from '../components/Toolbar' import Preferences from '../components/Preferences' import Nav from '../../../components/Nav' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import * as IndexActions from '../../../redux/actions' import * as ProjectActions from '../../../redux/actions/project' class IDEView extends React.Component { componentDidMount() { if (this.props.params.project_id) { const id = this.props.params.project_id this.props.getProject(id); } } render() { return (
) } } function mapStateToProps(state) { return { file: state.file, ide: state.ide, preferences: state.preferences, user: state.user, project: state.project } } function mapDispatchToProps(dispatch) { return bindActionCreators(Object.assign({}, IndexActions, ProjectActions), dispatch); } export default connect(mapStateToProps, mapDispatchToProps)(IDEView);