From 9b9f339e3e72587bb31e2d1b6e77e9ec804302bf Mon Sep 17 00:00:00 2001 From: Ansh Date: Wed, 14 Jun 2023 13:26:44 -0700 Subject: [APP-686] Fix mobile web styling (#876) * fix desktop window size * fix desktop window size * add listener for resize events * fix when going from mobile to web * only add eventListener for web --- src/platform/detection.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/platform/detection.ts') diff --git a/src/platform/detection.ts b/src/platform/detection.ts index 5d2ffcb22..da33fdca7 100644 --- a/src/platform/detection.ts +++ b/src/platform/detection.ts @@ -4,8 +4,9 @@ export const isIOS = Platform.OS === 'ios' export const isAndroid = Platform.OS === 'android' export const isNative = isIOS || isAndroid export const isWeb = !isNative +export const isMobileWebMediaQuery = 'only screen and (max-width: 1230px)' export const isMobileWeb = isWeb && // @ts-ignore we know window exists -prf - global.window.matchMedia('only screen and (max-width: 1000px)')?.matches + global.window.matchMedia(isMobileWebMediaQuery)?.matches export const isDesktopWeb = isWeb && !isMobileWeb -- cgit 1.4.1