-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
46 lines (38 loc) · 1.12 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
import 'react-native-gesture-handler';
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import useCachedResources from './hooks/useCachedResources';
import Navigation from './navigation';
import { ApolloProvider } from '@apollo/client';
import { client } from './graphql';
import AuthProvider from './context/AuthProvider';
import {
useFonts,
Poppins_400Regular,
Poppins_600SemiBold,
Poppins_700Bold
} from '@expo-google-fonts/poppins';
import Loader from './components/Loader';
const Poppins = {
Poppins_400Regular,
Poppins_600SemiBold,
Poppins_700Bold
};
const App = () => {
const isLoadingComplete = useCachedResources();
const [fontsLoaded] = useFonts({ ...Poppins });
if(!isLoadingComplete) return null;
if(!fontsLoaded) return <Loader/>;
return (
<ApolloProvider client={client}>
<AuthProvider>
<SafeAreaProvider>
<Navigation/>
<StatusBar translucent backgroundColor="transparent"/>
</SafeAreaProvider>
</AuthProvider>
</ApolloProvider>
);
};
export default App;