-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
38 lines (35 loc) · 976 Bytes
/
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
// @flow
import React, { Component } from 'react';
import { withNamespaces, i18n } from 'react-i18next';
import FlashMessage from 'react-native-flash-message';
import { View } from 'react-native';
import { AppContainer } from './src/components/navigation/navigation';
type Props = {
t: i18n.t,
logOut: () => void,
};
export const LogOutProvider = React.createContext({
logOut: () => {
console.warn('not set');
},
});
class App extends Component<Props> {
render() {
return (
<LogOutProvider.Provider
value={{
logOut: this.props.logOut,
}}
>
<View style={{ flex: 1 }}>
<AppContainer />
<FlashMessage duration={1000} />
</View>
</LogOutProvider.Provider>
);
}
}
export default withNamespaces('common', {
bindI18n: 'languageChanged',
bindStore: false,
})(App);