Skip to content

Commit d31916f

Browse files
committed
Render FullView with EmbedFrame
1 parent 263f48c commit d31916f

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

client/modules/IDE/actions/project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function setNewProject(project) {
5454
export function getProject(id, username) {
5555
return (dispatch, getState) => {
5656
dispatch(justOpenedProject());
57-
apiClient
57+
return apiClient
5858
.get(`/${username}/projects/${id}`)
5959
.then((response) => {
6060
dispatch(setProject(response.data));

client/modules/IDE/pages/FullView.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { bindActionCreators } from 'redux';
55
import { connect } from 'react-redux';
66
import PreviewFrame from '../components/PreviewFrame';
77
import PreviewNav from '../../../components/PreviewNav';
8-
import * as ProjectActions from '../actions/project';
8+
import { getProject } from '../actions/project';
9+
import { startSketch } from '../actions/ide';
910

1011
class FullView extends React.Component {
1112
componentDidMount() {
12-
this.props.getProject(
13-
this.props.params.project_id,
14-
this.props.params.username
15-
);
13+
this.props
14+
.getProject(this.props.params.project_id, this.props.params.username)
15+
.then(this.props.startSketch);
1616
}
1717

1818
render() {
@@ -51,7 +51,8 @@ FullView.propTypes = {
5151
username: PropTypes.string
5252
})
5353
}).isRequired,
54-
getProject: PropTypes.func.isRequired
54+
getProject: PropTypes.func.isRequired,
55+
startSketch: PropTypes.func.isRequired
5556
};
5657

5758
function mapStateToProps(state) {
@@ -61,7 +62,7 @@ function mapStateToProps(state) {
6162
}
6263

6364
function mapDispatchToProps(dispatch) {
64-
return bindActionCreators(ProjectActions, dispatch);
65+
return bindActionCreators({ getProject, startSketch }, dispatch);
6566
}
6667

6768
export default connect(mapStateToProps, mapDispatchToProps)(FullView);

0 commit comments

Comments
 (0)