⛏ create uri method for bypassing the mobile screen
This commit is contained in:
parent
ca0d953b80
commit
95986a2df6
2 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,7 @@ const Screen = ({ children }) => (
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
Screen.propTypes = {
|
Screen.propTypes = {
|
||||||
children: PropTypes.element.isRequired
|
children: PropTypes.node.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
|
|
|
@ -25,8 +25,10 @@ const onRouteChange = (store) => {
|
||||||
store.dispatch(stopSketch());
|
store.dispatch(stopSketch());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ignoreMobile = () => window.location.search.substring(1).includes('ignoremobile');
|
||||||
|
|
||||||
const isMobile = () => window.innerWidth <= 760;
|
const isMobile = () => window.innerWidth <= 760;
|
||||||
const IDEView = isMobile() ? IDEViewMobileScreen : IDEViewScreen;
|
const IDEView = isMobile() && !ignoreMobile() ? IDEViewMobileScreen : IDEViewScreen;
|
||||||
|
|
||||||
const routes = store => (
|
const routes = store => (
|
||||||
<Route path="/" component={App} onChange={() => { onRouteChange(store); }}>
|
<Route path="/" component={App} onChange={() => { onRouteChange(store); }}>
|
||||||
|
|
Loading…
Reference in a new issue