forked from btcven/locha-mesh-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
42 lines (36 loc) · 1.03 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
import React, { Component } from "react";
import { Provider } from "react-redux";
import RouteContainer from "./src/routes";
import store from "./src/store";
import { verifyAplicationState } from "./src/store/aplication";
import NativationService from "./src/utils/navigationService";
import { translate } from "react-i18next";
import i18n from "./src/i18n/index";
import Bitcoin from "./src/utils/Bitcoin";
import Database from './src/database'
const WrappedStack = ({ t }) => {
return (
<RouteContainer
ref={ref => {
NativationService.setTopLevelNavigator(ref);
}}
screenProps={{ t }}
/>
);
};
const ReloadAppOnLanguageChange = translate("common", {
bindI18n: "languageChanged",
bindStore: false
})(WrappedStack);
export const database = new Database()
export const bitcoin = new Bitcoin();
export default class App extends Component {
render() {
store.dispatch(verifyAplicationState());
return (
<Provider store={store}>
<ReloadAppOnLanguageChange />
</Provider>
);
}
}