🧹 clean up routes.js

This commit is contained in:
ghalestrilo 2020-06-19 15:58:48 -03:00
parent 776c3d2caf
commit eb3bc59382

View file

@ -22,10 +22,11 @@ const checkAuth = (store) => {
store.dispatch(getUser()); store.dispatch(getUser());
}; };
// This short-circuit seems unnecessary - using the mobile <Switch /> navigator (future) should prevent this from being called
const onRouteChange = (store) => { const onRouteChange = (store) => {
// FIXME: This seems unnecessary - using the mobile <Switch /> navigator should prevent this from being called
const path = window.location.pathname; const path = window.location.pathname;
if (path.includes('/mobile')) return; if (path.includes('/mobile')) return;
store.dispatch(stopSketch()); store.dispatch(stopSketch());
}; };