From 26336a24a85bd4bd44c8804760d85d28e63c8cff Mon Sep 17 00:00:00 2001 From: ghalestrilo Date: Wed, 19 Aug 2020 17:53:51 -0300 Subject: [PATCH] :construction: change mobile breakpoint to 800px --- client/routes.jsx | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/client/routes.jsx b/client/routes.jsx index b2cffc89..ae1876d4 100644 --- a/client/routes.jsx +++ b/client/routes.jsx @@ -27,20 +27,12 @@ const checkAuth = (store) => { store.dispatch(getUser()); }; -// const MobileFirstRoute = props => ( -// -// -// {matches => (matches -// ? props.component(props) -// : props.fallback(props))} -// -// ); - -// MobileFirstRoute.propTypes = { -// path: PropTypes.string.isRequired, -// component: PropTypes.any.isRequired, // eslint-disable-line -// fallback: PropTypes.any.isRequired // eslint-disable-line -// }; +const mobileFirst = (MobileComponent, Fallback) => props => ( + + {matches => (matches + ? + : )} + ); // TODO: This short-circuit seems unnecessary - using the mobile navigator (future) should prevent this from being called const onRouteChange = (store) => { @@ -52,15 +44,7 @@ const onRouteChange = (store) => { const routes = store => ( { onRouteChange(store); }}> - ( - - {matches => (matches - ? - : )} - )} - /> +