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

View file

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