-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
99 lines (94 loc) · 2.49 KB
/
index.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import * as React from 'react';
import {AppRegistry} from 'react-native';
import {Provider as StoreProvider} from 'react-redux';
import {name as appName} from './app.json';
import App from './src/App';
import {Store} from './store/Store';
import {NavigationContainer} from '@react-navigation/native';
import {light} from './src/style/theme';
import {ThemeProvider} from 'styled-components/native';
import {QueryClient, QueryClientProvider} from 'react-query';
// import CodePush from 'react-native-code-push';
import 'core-js/stable/atob';
const queryClient = new QueryClient();
import {ModalProvider} from './src/Modal/ModalProvider';
import CustomModal from './src/Modal/CustomModal';
import Toast, {
BaseToast,
ErrorToast,
InfoToast,
} from 'react-native-toast-message';
// const codePushOptions = {
// checkFrequency: CodePush.CheckFrequency.ON_APP_START,
// installMode: CodePush.InstallMode.IMMEDIATE,
// mandatoryInstallMode: CodePush.InstallMode.IMMEDIATE,
// };
const toastConfig = {
success: props => (
<BaseToast
{...props}
style={{
borderLeftColor: '#648CF3',
}}
text1Style={{
fontSize: 14,
fontFamily: 'NotoSansKR-Bold',
lineHeight: 17.5,
}}
text2Style={{
fontSize: 12,
fontFamily: 'NotoSansKR-Medium',
lineHeight: 15,
}}
/>
),
error: props => (
<ErrorToast
{...props}
text1Style={{
fontSize: 14,
fontFamily: 'NotoSansKR-Bold',
lineHeight: 17.5,
}}
text2Style={{
fontSize: 12,
fontFamily: 'NotoSansKR-Medium',
lineHeight: 15,
}}
/>
),
info: props => (
<InfoToast
{...props}
text1Style={{
fontSize: 14,
fontFamily: 'NotoSansKR-Bold',
lineHeight: 17.5,
}}
text2Style={{
fontSize: 12,
fontFamily: 'NotoSansKR-Medium',
lineHeight: 15,
}}
/>
),
};
function Main() {
return (
<QueryClientProvider client={queryClient}>
<StoreProvider store={Store}>
<ThemeProvider theme={light}>
<ModalProvider>
<NavigationContainer>
<App />
<Toast config={toastConfig} />
<CustomModal />
</NavigationContainer>
</ModalProvider>
</ThemeProvider>
</StoreProvider>
</QueryClientProvider>
);
}
// AppRegistry.registerComponent(appName, () => CodePush(codePushOptions)(Main));
AppRegistry.registerComponent(appName, () => Main);