-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.tsx
56 lines (47 loc) · 1.67 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React, {useEffect} from 'react';
import {LogBox, UIManager} from 'react-native';
import {StatusBar} from 'native-base';
import NavigationContainer from '~/navigators';
import Providers from '~/providers/Providers';
import SplashScreen from 'react-native-splash-screen';
import SoundService from '~/services/Alert.service';
import {awsInit} from '~/services/Amazon.service';
import '~/i18n/i18n';
import crashlytics from '@react-native-firebase/crashlytics';
import {isAndroid} from '~/utils';
isAndroid && SoundService.setCategory('Playback');
awsInit();
const App = () => {
useEffect(() => {
LogBox.ignoreLogs([
'NativeBase: The contrast ratio of 1.4001048177026059:1 for gray.800',
'Setting a timer for a long period of time, i.e. multiple minutes',
'If you do not provide children, you must specify an aria-label',
'Using an insecure random number generator',
'Node of type rule not supported',
'new NativeEventEmitter()',
]);
UIManager.setLayoutAnimationEnabledExperimental &&
UIManager.setLayoutAnimationEnabledExperimental(true);
SplashScreen.hide();
}, []);
useEffect(() => {
/* I need explicitly enable this crashlytics collecting to force iOS collection in debug, still no luck with reporting
after checking if all is working in debug , we can remove this setter
*/
(async function () {
await crashlytics().setCrashlyticsCollectionEnabled(true);
})();
}, []);
return (
<Providers>
<StatusBar
translucent={true}
backgroundColor={'transparent'}
barStyle={'dark-content'}
/>
<NavigationContainer />
</Providers>
);
};
export default App;