-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
40 lines (36 loc) · 1.14 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
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { Intro } from './app/screens';
import 'react-native-gesture-handler';
import Navigation from './app/navigation';
import { useFonts } from 'expo-font';
import Spinner from 'react-native-loading-spinner-overlay';
import useLoadFonts from './assets/Fonts';
import { Provider } from 'react-redux';
import store from './redux/Store/store';
import persistStore from 'redux-persist/es/persistStore';
import { PersistGate } from 'redux-persist/integration/react';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
const persister = persistStore(store);
export default function App() {
const loaded = useLoadFonts();
// font loads first before rendering main component //
if(!loaded){
return(
<Spinner
visible={true}
color="#F4F2F2"
size={50}
/>
)
}
return (
<Provider store={store}>
<PersistGate persistor = {persister} >
<GestureHandlerRootView>
<Navigation/>
</GestureHandlerRootView>
</PersistGate>
</Provider>
);
}