From 95986a2df6491fcb8f6c13aa356a190284a0f3de Mon Sep 17 00:00:00 2001 From: ghalestrilo Date: Tue, 9 Jun 2020 17:08:14 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9B=8F=20=20create=20uri=20method=20for=20by?= =?UTF-8?q?passing=20the=20mobile=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/modules/IDE/pages/IDEViewMobile.jsx | 2 +- client/routes.jsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/pages/IDEViewMobile.jsx b/client/modules/IDE/pages/IDEViewMobile.jsx index b603e758..edc7c4bb 100644 --- a/client/modules/IDE/pages/IDEViewMobile.jsx +++ b/client/modules/IDE/pages/IDEViewMobile.jsx @@ -22,7 +22,7 @@ const Screen = ({ children }) => ( ); Screen.propTypes = { - children: PropTypes.element.isRequired + children: PropTypes.node.isRequired }; export default () => ( diff --git a/client/routes.jsx b/client/routes.jsx index 02cdaa07..9502857f 100644 --- a/client/routes.jsx +++ b/client/routes.jsx @@ -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 => ( { onRouteChange(store); }}>