[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user