-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
58 lines (51 loc) · 1.37 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
57
58
/* eslint-disable react/style-prop-object */
import 'intl';
import 'intl/locale-data/jsonp/en';
import { ScreenProvider } from 'responsive-native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { NavigationContainer } from '@react-navigation/native';
import React from 'react';
import { useFonts } from 'expo-font';
import {
Roboto_300Light,
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold,
} from '@expo-google-fonts/roboto';
import { ActivityIndicator, View } from 'react-native';
import { navigationRef } from '@shared/routes/rootNavigation';
import AppProvider from './src/shared/hooks';
import Routes from './src/shared/routes';
const App = (): JSX.Element => {
const [fontsLoaded] = useFonts({
Roboto_300Light,
Roboto_400Regular,
Roboto_500Medium,
Roboto_700Bold,
});
if (!fontsLoaded) {
return (
<View
style={{
flex: 1,
justifyContent: 'center',
backgroundColor: '#141517',
}}
>
<ActivityIndicator size="large" color="#999" />
</View>
);
}
return (
<SafeAreaProvider>
<ScreenProvider baseFontSize={16}>
<NavigationContainer ref={navigationRef}>
<AppProvider>
<Routes />
</AppProvider>
</NavigationContainer>
</ScreenProvider>
</SafeAreaProvider>
);
};
export default App;