diff --git a/src/AppNew.tsx b/src/AppNew.tsx index 71de311b0..837e889bc 100644 --- a/src/AppNew.tsx +++ b/src/AppNew.tsx @@ -5,7 +5,7 @@ import { QrSignerContextProvider } from 'providers/QrSignerContext'; import { ScannerContextProvider } from 'providers/ScannerContext'; import { SigningContextProvider } from 'providers/SigningContext'; import React, { useEffect } from 'react'; -import { AppState, Dimensions, Platform, StatusBar, StyleProp, View } from 'react-native'; +import { AppState, Platform, StatusBar, StyleProp, View } from 'react-native'; import { ThemeContext } from 'providers/contexts'; import { THEME_PRESET } from 'styles/themes'; import { ToastProvider } from 'react-native-toast-notifications'; @@ -20,12 +20,11 @@ import { LoadingScreen } from 'screens/LoadingScreen'; import { ColorMap } from 'styles/color'; import { AutoLockState } from 'utils/autoLock'; import useStoreBackgroundService from 'hooks/store/useStoreBackgroundService'; -import { HIDE_MODAL_DURATION, statusBarHeight, TOAST_DURATION } from 'constants/index'; +import { HIDE_MODAL_DURATION, TOAST_DURATION } from 'constants/index'; import AppNavigator from './AppNavigator'; import { keyringLock } from 'messaging/index'; import { updateShowZeroBalanceState } from 'stores/utils'; import { setBuildNumber } from './stores/AppVersion'; -// import { hasMigratedFromAsyncStorage, migrateFromAsyncStorage } from 'utils/storage'; import { getBuildNumber } from 'react-native-device-info'; import { AppModalContextProvider } from './providers/AppModalContext'; import { CustomToast } from 'components/design-system-ui/toast'; @@ -177,8 +176,10 @@ export const AppNew = () => { position: 'absolute', top: 0, left: 0, - width: Dimensions.get('window').width, - height: Dimensions.get('window').height + (Platform.OS === 'ios' ? 0 : statusBarHeight), + bottom: 0, + right: 0, + width: '100%', + height: '100%', zIndex: 9999, }}> diff --git a/src/components/ContainerWithSubHeader.tsx b/src/components/ContainerWithSubHeader.tsx index cb6245ed4..e9a2270b3 100644 --- a/src/components/ContainerWithSubHeader.tsx +++ b/src/components/ContainerWithSubHeader.tsx @@ -3,6 +3,7 @@ import { KeyboardAvoidingView, Platform, SafeAreaView, StyleProp, View } from 'r import { SubHeader, SubHeaderProps } from 'components/SubHeader'; import { Header } from 'components/Header'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import DeviceInfo from 'react-native-device-info'; export interface ContainerWithSubHeaderProps extends SubHeaderProps { children: JSX.Element | JSX.Element[]; @@ -20,7 +21,7 @@ const getContainerStyle: (insetTop: number, backgroundColor?: string) => StylePr return { flex: 1, backgroundColor: backgroundColor || '#0C0C0C', - paddingTop: insetTop + (Platform.OS === 'ios' ? 0 : 8), + paddingTop: insetTop + (DeviceInfo.hasNotch() ? 0 : 8), }; }; diff --git a/src/components/Modal/ConnectWebsiteModal.tsx b/src/components/Modal/ConnectWebsiteModal.tsx index 4cf28ead8..321f68d24 100644 --- a/src/components/Modal/ConnectWebsiteModal.tsx +++ b/src/components/Modal/ConnectWebsiteModal.tsx @@ -253,7 +253,7 @@ export const ConnectWebsiteModal = ({ setVisible, modalVisible, isNotConnected, onBackButtonPress={onChangeModalVisible} contentContainerStyle={stylesheet.modalContentContainerStyle} footer={{actionButtons}}> - + {