-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
42 lines (32 loc) · 1.16 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
import 'react-native-gesture-handler';
import 'react-native-get-random-values';
import { AppRegistry } from 'react-native';
import { Buffer } from 'buffer';
import process from 'process';
import PropTypes from 'prop-types';
import { jobRunner } from '@shared/lib/services/jobManagement';
import { name as appName } from './app.json';
import App from './src/app';
import displayRemoteNotifications from './src/jobs/display-remote-notifications';
import localization from './src/jobs/localization';
import requestInterception from './src/jobs/request-interception';
import responseInterception from './src/jobs/response-interception';
import setBackgroundTask from './src/jobs/set-background-task';
global.Buffer = Buffer;
global.process = process;
jobRunner
.runAll([requestInterception, responseInterception, setBackgroundTask])
.catch(console.error);
jobRunner
.runAllSync([localization, displayRemoteNotifications])
.catch(console.error);
function HeadlessCheck({ isHeadless }) {
if (isHeadless) {
return null;
}
return <App />;
}
HeadlessCheck.propTypes = {
isHeadless: PropTypes.bool,
};
AppRegistry.registerComponent(appName, () => HeadlessCheck);