♻️ change responsive logic from minDeviceWidth to minWidth

This commit is contained in:
ghalestrilo 2020-08-21 17:11:34 -03:00
parent a2736e2423
commit 28d54bdfb5

View file

@ -10,7 +10,7 @@ export const mobileEnabled = () => (window.process.env.MOBILE_ENABLED === true);
* The created function returns a Component (props => jsx) * The created function returns a Component (props => jsx)
*/ */
export const createMobileFirst = store => (MobileComponent, Fallback) => props => ( export const createMobileFirst = store => (MobileComponent, Fallback) => props => (
<MediaQuery minDeviceWidth={770}> <MediaQuery minWidth={770}>
{matches => ((matches || (store && store.getState().editorAccessibility.forceDesktop) || (!mobileEnabled())) {matches => ((matches || (store && store.getState().editorAccessibility.forceDesktop) || (!mobileEnabled()))
? <Fallback {...props} /> ? <Fallback {...props} />
: <MobileComponent {...props} />)} : <MobileComponent {...props} />)}