Update App.js

This commit is contained in:
Marcos Rodriguez Velez 2023-10-20 13:59:56 -04:00
parent aee4c9dd6f
commit 55718c57bf
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7

11
App.js
View File

@ -11,9 +11,10 @@ import {
UIManager,
useColorScheme,
View,
StatusBar,
LogBox,
} from 'react-native';
import { NavigationContainer, CommonActions, useNavigation } from '@react-navigation/native';
import { NavigationContainer, CommonActions } from '@react-navigation/native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
@ -69,7 +70,6 @@ const App = () => {
const appState = useRef(AppState.currentState);
const clipboardContent = useRef();
const colorScheme = useColorScheme();
const { setOptions } = useNavigation();
const onNotificationReceived = async notification => {
const payload = Object.assign({}, notification, notification.data);
@ -113,12 +113,6 @@ const App = () => {
}
};
useEffect(() => {
setOptions({
statusBarStyle: Platform.select({ ios: 'light', default: colorScheme === 'dark' ? 'light' : 'dark' }),
});
}, [colorScheme, setOptions]);
useEffect(() => {
if (walletsInitialized) {
addListeners();
@ -390,6 +384,7 @@ const App = () => {
return (
<SafeAreaProvider>
<View style={styles.root}>
<StatusBar barStyle={colorScheme === 'dark' ? 'light-content' : 'dark-content'} backgroundColor="transparent" translucent />
<NavigationContainer ref={navigationRef} theme={colorScheme === 'dark' ? BlueDarkTheme : BlueDefaultTheme}>
<InitRoot />
<Notifications onProcessNotifications={processPushNotifications} />