-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
49 lines (44 loc) · 1.4 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
import React, { useState } from "react";
// import i18n from "i18n-js";
import { AppLoading } from "expo";
import { Provider } from "react-redux";
import * as eva from "@eva-design/eva";
// import * as Localization from "expo-localization";
import { PersistGate } from "redux-persist/integration/react";
import { ApplicationProvider, IconRegistry } from "@ui-kitten/components";
import { loadFonts } from "./styles/fonts";
import { RootNav } from "./navigation/RootNav";
import store, { persistor } from "./store/index";
import { FeatherIconsPack, IoniconsPack } from "./utils";
// import en from "./translations/en.json";
// import az from "./translations/az.json";
// import ru from "./translations/ru.json";
// i18n.translations = {
// en,
// ru,
// az,
// };
export default function App() {
// i18n.locale = Localization.locale;
// i18n.fallbacks = true;
const [loaded, setLoaded] = useState(false);
if (!loaded) {
return (
<AppLoading
startAsync={loadFonts}
onFinish={() => setLoaded(true)}
onError={() => console.log("loading faileddddd")}
/>
);
}
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<IconRegistry icons={[FeatherIconsPack, IoniconsPack]} />
<ApplicationProvider {...eva} theme={eva.light}>
<RootNav />
</ApplicationProvider>
</PersistGate>
</Provider>
);
}