-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
41 lines (36 loc) · 1.22 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
import 'react-native-gesture-handler';
import {
useFonts,
Nunito_300Light,
Nunito_400Regular,
Nunito_600SemiBold,
} from '@expo-google-fonts/nunito';
import AppLoading from 'expo-app-loading';
import { LogBox } from 'react-native';
import FlashMessage from 'react-native-flash-message';
import { enableScreens } from 'react-native-screens';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { AppLoadingIndicatorContextProvider } from './contexts/app-loading-indicator';
import AppNavigator from './navigation';
import { persistor, store } from './store';
enableScreens();
LogBox.ignoreLogs(['https://github.com/facebook/react-native/issues/12981']);
export default function App() {
const [areFontsLoaded] = useFonts({ Nunito_300Light, Nunito_400Regular, Nunito_600SemiBold });
if (!areFontsLoaded) {
return <AppLoading />;
}
return (
<>
<Provider store={store}>
<PersistGate loading={<AppLoading />} persistor={persistor}>
<AppLoadingIndicatorContextProvider>
<AppNavigator />
</AppLoadingIndicatorContextProvider>
</PersistGate>
</Provider>
<FlashMessage position="top" />
</>
);
}