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 - ? - : )} - )} - /> +