An ATproto social media client -- with an independent Appview.

Fix unscrollable body when returning to desktop mode from mobile mode with navigation drawer open. (#6201)

* fix: only lock body when drawer is opened and not in desktop mode

* Reuse variable

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>

authored by

JustSNguyen
Dan Abramov
and committed by
GitHub
2728de03 b85a7da2

+3 -2
+3 -2
src/view/shell/index.web.tsx
··· 32 const navigator = useNavigation<NavigationProp>() 33 const closeAllActiveElements = useCloseAllActiveElements() 34 const {_} = useLingui() 35 36 - useWebBodyScrollLock(isDrawerOpen) 37 useComposerKeyboardShortcut() 38 useIntentHandler() 39 ··· 56 <Lightbox /> 57 <PortalOutlet /> 58 59 - {!isDesktop && isDrawerOpen && ( 60 <TouchableWithoutFeedback 61 onPress={ev => { 62 // Only close if press happens outside of the drawer
··· 32 const navigator = useNavigation<NavigationProp>() 33 const closeAllActiveElements = useCloseAllActiveElements() 34 const {_} = useLingui() 35 + const showDrawer = !isDesktop && isDrawerOpen 36 37 + useWebBodyScrollLock(showDrawer) 38 useComposerKeyboardShortcut() 39 useIntentHandler() 40 ··· 57 <Lightbox /> 58 <PortalOutlet /> 59 60 + {showDrawer && ( 61 <TouchableWithoutFeedback 62 onPress={ev => { 63 // Only close if press happens outside of the drawer