-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
47 lines (45 loc) · 1.62 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
import 'react-native-gesture-handler';
import React from 'react';
import { ApplicationProvider, IconRegistry } from '@ui-kitten/components';
import { EvaIconsPack } from '@ui-kitten/eva-icons';
import * as eva from '@eva-design/eva';
import { default as theme } from './theme.json';
import { default as mapping } from './mapping.json';
import uiKittenMappingForAndroid from './src/helper/uiKittenMappingForAndroid';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { SafeAreaView } from 'react-native';
import { StatusBar } from 'expo-status-bar';
import Style, { normalize } from './src/styles/Style';
import { Provider } from 'react-redux';
import MainApp from './src/MainApp';
import { store } from './src/store/Store';
import Theme from './src/styles/Theme';
import { useFont } from './src/hooks/useFont';
import Loader from './src/components/Loader';
function App(): JSX.Element {
const isLoadingComplete = useFont();
if (!isLoadingComplete) {
return <Loader />;
}
return (
<GestureHandlerRootView style={Style.container}>
<SafeAreaView style={Style.container}>
<StatusBar
animated={true}
backgroundColor={Theme.color.secondary}
style='auto'
/>
<IconRegistry icons={EvaIconsPack} />
<ApplicationProvider
{...eva}
customMapping={{ ...eva.mapping, ...uiKittenMappingForAndroid(mapping) }}
theme={{ ...eva.light, ...theme }}>
<Provider store={store}>
<MainApp />
</Provider>
</ApplicationProvider>
</SafeAreaView>
</GestureHandlerRootView>
);
}
export default App;