⛏ create uri method for bypassing the mobile screen

This commit is contained in:
ghalestrilo 2020-06-09 17:08:14 -03:00
parent ca0d953b80
commit 95986a2df6
2 changed files with 4 additions and 2 deletions

View file

@ -22,7 +22,7 @@ const Screen = ({ children }) => (
</div>
);
Screen.propTypes = {
children: PropTypes.element.isRequired
children: PropTypes.node.isRequired
};
export default () => (

View file

@ -25,8 +25,10 @@ const onRouteChange = (store) => {
store.dispatch(stopSketch());
};
const ignoreMobile = () => window.location.search.substring(1).includes('ignoremobile');
const isMobile = () => window.innerWidth <= 760;
const IDEView = isMobile() ? IDEViewMobileScreen : IDEViewScreen;
const IDEView = isMobile() && !ignoreMobile() ? IDEViewMobileScreen : IDEViewScreen;
const routes = store => (
<Route path="/" component={App} onChange={() => { onRouteChange(store); }}>