mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 02:09:10 +01:00
34 lines
891 B
TypeScript
34 lines
891 B
TypeScript
import 'react-native-gesture-handler'; // should be on top
|
|
import React, { Suspense, lazy, useEffect } from 'react';
|
|
import { NativeModules, Platform } from 'react-native';
|
|
import MainRoot from './navigation';
|
|
import { useStorage } from './blue_modules/storage-context';
|
|
import Biometric from './class/biometrics';
|
|
const CompanionDelegates = lazy(() => import('./components/CompanionDelegates'));
|
|
const { SplashScreen } = NativeModules;
|
|
|
|
const MasterView = () => {
|
|
const { walletsInitialized } = useStorage();
|
|
|
|
useEffect(() => {
|
|
if (Platform.OS === 'ios') {
|
|
// Call hide to setup the listener on the native side
|
|
SplashScreen?.addObserver();
|
|
}
|
|
}, []);
|
|
|
|
return (
|
|
<>
|
|
<Biometric />
|
|
<MainRoot />
|
|
{walletsInitialized && (
|
|
<Suspense>
|
|
<CompanionDelegates />
|
|
</Suspense>
|
|
)}
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default MasterView;
|