-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
51 lines (42 loc) · 1.24 KB
/
App.js
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
import React , {useState , useEffect} from 'react';
import { AsyncStorage , I18nManager } from 'react-native';
import { AppLoading } from 'expo';
import * as Font from 'expo-font';
import { Ionicons } from '@expo/vector-icons';
import AppNavigator from './src/routes';
import { Root } from "native-base";
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { store, persistedStore } from './src/store';
import './ReactotronConfig';
function App({navigation}) {
const [isReady, setIsReady] = useState(false);
useEffect( () => {
// I18nManager.forceRTL(true);
// AsyncStorage.clear()
async function loadFont(){
await Font.loadAsync({
sukar : require('./assets/fonts/Sukar-Regular.ttf'),
sukarBold : require('./assets/fonts/Sukar-Bold.ttf'),
Roboto: require('native-base/Fonts/Roboto.ttf'),
Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
...Ionicons.font,
});
setIsReady(true)
}
loadFont();
}, []);
if (!isReady) {
return <AppLoading />;
}
return (
<Provider store={store}>
<PersistGate persistor={persistedStore}>
<Root>
<AppNavigator />
</Root>
</PersistGate>
</Provider>
);
}
export default App;