This commit is contained in:
catarak 2016-08-27 21:52:00 -04:00
parent e6bd224694
commit 4859b66cc6
2 changed files with 8 additions and 2 deletions

View File

@ -59,7 +59,10 @@ function Nav(props) {
return (
<li className="nav__item">
<p className="nav__open">
<Link to="/sketches">
<Link
to="/sketches"
onClick={props.stopSketch}
>
Open
</Link>
</p>
@ -130,7 +133,8 @@ Nav.propTypes = {
project: PropTypes.shape({
id: PropTypes.string
}),
logoutUser: PropTypes.func.isRequired
logoutUser: PropTypes.func.isRequired,
stopSketch: PropTypes.func.isRequired
};
export default Nav;

View File

@ -31,6 +31,7 @@ class IDEView extends React.Component {
}
componentDidMount() {
this.props.stopSketch();
if (this.props.params.project_id) {
const id = this.props.params.project_id;
this.props.getProject(id);
@ -119,6 +120,7 @@ class IDEView extends React.Component {
cloneProject={this.props.cloneProject}
project={this.props.project}
logoutUser={this.props.logoutUser}
stopSketch={this.props.stopSketch}
/>
<Toolbar
className="Toolbar"