-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.web.js
46 lines (37 loc) · 1.26 KB
/
index.web.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
/* eslint-disable no-undef */
import React from 'react';
import { AppRegistry } from 'react-native';
import { NavigationBar } from '@shoutem/ui';
import { AppBuilder } from 'shoutem-core';
import 'es6-symbol/implement';
import extensions from './extensions.js';
// WebInjectionMark-font-imports
// Web styling
import '@shoutem/ui/web/style/Alert.scss';
// Supress current legacy errors
const consoleError = console.error;
const SUPPRESSED_WARNINGS = [
'childContextTypes API which is no longer supported',
'Support for defaultProps will be removed',
'legacy contextTypes API which is no longer supported',
];
console.error = function filterWarnings(msg, ...args) {
if (!SUPPRESSED_WARNINGS.some(entry => msg.includes(entry))) {
consoleError(msg, ...args);
}
};
// WebInjectionMark-font-styles
// WebInjectionMark-create-stylesheet
// WebInjectionMark-append-font-styles
// WebInjectionMark-inject-stylesheet
function renderNavigationBar(navBarProps) {
return <NavigationBar {...navBarProps} />;
}
const App = new AppBuilder()
.setExtensions(extensions)
.setRenderNavigationBar(renderNavigationBar)
.build();
AppRegistry.registerComponent('ShoutemApp', () => App);
AppRegistry.runApplication('ShoutemApp', {
rootTag: document.getElementById('app-root'),
});