Fix(challenges): Let code load update the main frame

Also display a message to the user that we loaded
in-progress code.
This commit is contained in:
Berkeley Martinez
2016-08-13 17:53:03 -07:00
parent 1c460e3319
commit c3d9d48b01
2 changed files with 23 additions and 11 deletions

View File

@@ -11,7 +11,6 @@ import BugModal from '../Bug-Modal.jsx';
import { challengeSelector } from '../../redux/selectors';
import {
executeChallenge,
updateMain,
updateFile,
loadCode
} from '../../redux/actions';
@@ -41,7 +40,6 @@ const mapStateToProps = createSelector(
const bindableActions = {
executeChallenge,
updateFile,
updateMain,
loadCode
};
@@ -55,13 +53,11 @@ export class Challenge extends PureComponent {
mode: PropTypes.string,
updateFile: PropTypes.func,
executeChallenge: PropTypes.func,
updateMain: PropTypes.func,
loadCode: PropTypes.func
};
componentDidMount() {
this.props.loadCode();
this.props.updateMain();
}
componentWillReceiveProps(nextProps) {