-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
65 lines (58 loc) · 1.61 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import React from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { setCustomText } from "react-native-global-props";
import configureStore, { persistor } from './src/redux/configureStore';
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
import { Root } from 'native-base';
import ErrorBoundary from './ErrorBoundary';
import locales from './locales';
import Router from './src/router'
const store = configureStore();
const theme = {
...DefaultTheme,
roundness: 2,
colors: {
...DefaultTheme.colors,
primary: '#3498db',
accent: '#f1c40f',
},
};
const customTextProps = {
style: {
fontFamily: "IRANSansWeb(FaNum)_Light",
fontWeight: 'normal',
direction: 'rtl',
}
};
setCustomText(customTextProps);
locales.setActiveLanguage('fa-ir');
global.locales = locales.localize;
global.shouldShowRibbon = false;
global.meInfo = {
is_seller: 0,
loggedInUserId: ''
};
global.refreshProductList = false;
global.isAppStateChangedCauseOfPayment = false;
global.isBuyAdRequestsFocuesd = false;
class App extends React.Component {
render() {
return (
<>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<PaperProvider theme={theme}>
<Root>
<ErrorBoundary>
<Router />
</ErrorBoundary>
</Root>
</PaperProvider>
</PersistGate>
</Provider >
</>
)
}
};
export default App;