Logged out improvments (#5771)
* fetch all accounts in one go * delete unused component * add safeareaview to logged out layout * add safe area insets to LoggedOut view * add safe area insets to the error boundary * sanitize displaynames/handles * use button for X * increase spacing
This commit is contained in:
@@ -23,17 +23,17 @@ import type {NativeStackNavigatorProps} from '@react-navigation/native-stack/src
|
||||
|
||||
import {PWI_ENABLED} from '#/lib/build-flags'
|
||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
import {isNative, isWeb} from '#/platform/detection'
|
||||
import {useSession} from '#/state/session'
|
||||
import {useOnboardingState} from '#/state/shell'
|
||||
import {
|
||||
useLoggedOutView,
|
||||
useLoggedOutViewControls,
|
||||
} from '#/state/shell/logged-out'
|
||||
import {isNative, isWeb} from 'platform/detection'
|
||||
import {LoggedOut} from '#/view/com/auth/LoggedOut'
|
||||
import {Deactivated} from '#/screens/Deactivated'
|
||||
import {Onboarding} from '#/screens/Onboarding'
|
||||
import {SignupQueued} from '#/screens/SignupQueued'
|
||||
import {LoggedOut} from '../com/auth/LoggedOut'
|
||||
import {BottomBarWeb} from './bottom-bar/BottomBarWeb'
|
||||
import {DesktopLeftNav} from './desktop/LeftNav'
|
||||
import {DesktopRightNav} from './desktop/RightNav'
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react'
|
||||
import {BackHandler, StyleSheet, useWindowDimensions, View} from 'react-native'
|
||||
import {Drawer} from 'react-native-drawer-layout'
|
||||
import Animated from 'react-native-reanimated'
|
||||
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||
import * as NavigationBar from 'expo-navigation-bar'
|
||||
import {StatusBar} from 'expo-status-bar'
|
||||
import {useNavigation, useNavigationState} from '@react-navigation/native'
|
||||
@@ -41,6 +42,7 @@ function ShellInner() {
|
||||
const isDrawerSwipeDisabled = useIsDrawerSwipeDisabled()
|
||||
const setIsDrawerOpen = useSetDrawerOpen()
|
||||
const winDim = useWindowDimensions()
|
||||
const insets = useSafeAreaInsets()
|
||||
|
||||
const renderDrawerContent = React.useCallback(() => <DrawerContent />, [])
|
||||
const onOpenDrawer = React.useCallback(
|
||||
@@ -94,7 +96,8 @@ function ShellInner() {
|
||||
return (
|
||||
<>
|
||||
<Animated.View style={[a.h_full]}>
|
||||
<ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
style={{paddingTop: insets.top, paddingBottom: insets.bottom}}>
|
||||
<Drawer
|
||||
renderDrawerContent={renderDrawerContent}
|
||||
drawerStyle={{width: Math.min(400, winDim.width * 0.8)}}
|
||||
|
||||
Reference in New Issue
Block a user