diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 6ef4fb35..a767539b 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -83,7 +83,6 @@ class Nav extends React.PureComponent {

Open @@ -94,7 +93,9 @@ class Nav extends React.PureComponent { })()}

  • - + Examples

    @@ -187,7 +188,6 @@ Nav.propTypes = { }) }), logoutUser: PropTypes.func.isRequired, - stopSketch: PropTypes.func.isRequired, showShareModal: PropTypes.func.isRequired, showErrorModal: PropTypes.func.isRequired, unsavedChanges: PropTypes.bool.isRequired, diff --git a/client/routes.jsx b/client/routes.jsx index b4bdf6a8..082bc68c 100644 --- a/client/routes.jsx +++ b/client/routes.jsx @@ -11,11 +11,16 @@ import NewPasswordView from './modules/User/pages/NewPasswordView'; import AccountView from './modules/User/pages/AccountView'; // import SketchListView from './modules/Sketch/pages/SketchListView'; import { getUser } from './modules/User/actions'; +import { stopSketch } from './modules/IDE/actions/ide'; const checkAuth = (store) => { store.dispatch(getUser()); }; +const onRouteChange = (store) => { + store.dispatch(stopSketch()); +}; + const routes = (store) => { const sourceProtocol = findSourceProtocol(store.getState()); @@ -28,7 +33,7 @@ const routes = (store) => { }); return ( - + { onRouteChange(store); }}>