-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
43 lines (36 loc) · 1.18 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
import React, { Component, useEffect } from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/es/integration/react';
import { ActivityIndicator, Alert, View } from 'react-native';
import DeviceInfo from 'react-native-device-info';
import { store, persistor } from './src/redux/store';
import Navigator from './src/navigators';
import AppModals from './src/components/app-modals';
import { configurePushNotification } from './src/services/notification-service';
import { Colors } from './src/constants';
const App = (props) => {
useEffect(() => {
launchApp();
let uniqueId = DeviceInfo.getUniqueId();
console.log("uniqueId", uniqueId)
}, [])
const launchApp = () => {
configurePushNotification();
}
return (
<View style={{ flex: 1 }}>
<Provider store={store}>
<PersistGate loading={<Loading />} persistor={persistor}>
<Navigator />
<AppModals />
</PersistGate>
</Provider>
</View>
);
};
const Loading = () => (
<View style={{ alignItems: 'center', justifyContent: 'center' }}>
<ActivityIndicator color={Colors.ui_primary} size={'large'} />
</View>
);
export default App;