-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
43 lines (38 loc) · 1.08 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
/**
* @format
*/
import {AppRegistry} from 'react-native';
import App from './src/App';
import {name as appName} from './app.json';
import {Provider} from 'react-redux';
import store from './src/redux/store';
import {NativeBaseProvider, extendTheme} from 'native-base';
// Theme
import {COLOR, CONFIG, FONTS, SHADOWS} from './src/configs/globalStyles';
// Action Sheet
import {SheetProvider} from 'react-native-actions-sheet/dist/src/provider';
// firebase message
import messaging from '@react-native-firebase/messaging';
import './src/sheets';
// Register background handler
messaging().setBackgroundMessageHandler(async remoteMessage => {
console.log('Message handled in the background!', remoteMessage);
});
const Root = () => {
const theme = extendTheme({
colors: COLOR,
fonts: FONTS,
config: CONFIG,
shadows: SHADOWS,
});
return (
<Provider store={store}>
<NativeBaseProvider theme={theme}>
<SheetProvider>
<App />
</SheetProvider>
</NativeBaseProvider>
</Provider>
);
};
AppRegistry.registerComponent(appName, () => Root);