|
|
@@ -1,4 +1,5 @@
|
|
1
|
1
|
/* global APP */
|
|
|
2
|
+/* eslint-disable react/no-multi-comp */
|
|
2
|
3
|
|
|
3
|
4
|
import PropTypes from 'prop-types';
|
|
4
|
5
|
import React, { Component } from 'react';
|
|
|
@@ -15,6 +16,7 @@ import {
|
|
15
|
16
|
import { RouteRegistry } from '../../base/react';
|
|
16
|
17
|
import { MiddlewareRegistry, ReducerRegistry } from '../../base/redux';
|
|
17
|
18
|
import { toURLString } from '../../base/util';
|
|
|
19
|
+import { OverlayContainer } from '../../overlay';
|
|
18
|
20
|
import { BlankPage } from '../../welcome';
|
|
19
|
21
|
|
|
20
|
22
|
import { appNavigate, appWillMount, appWillUnmount } from '../actions';
|
|
|
@@ -25,6 +27,32 @@ import { appNavigate, appWillMount, appWillUnmount } from '../actions';
|
|
25
|
27
|
*/
|
|
26
|
28
|
const DEFAULT_URL = 'https://meet.jit.si';
|
|
27
|
29
|
|
|
|
30
|
+/**
|
|
|
31
|
+ * react-redux's {@code Provider} component only accepts a single child, so use
|
|
|
32
|
+ * a simple wrapper component in order to pass more than 1 child components.
|
|
|
33
|
+ * TODO: remove this once React Native supports Fragment (0.52 probably).
|
|
|
34
|
+ */
|
|
|
35
|
+class Fragment extends Component {
|
|
|
36
|
+ /**
|
|
|
37
|
+ * {@code Fragment} component's property types.
|
|
|
38
|
+ *
|
|
|
39
|
+ * @static
|
|
|
40
|
+ */
|
|
|
41
|
+ static propTypes = {
|
|
|
42
|
+ children: PropTypes.node
|
|
|
43
|
+ };
|
|
|
44
|
+
|
|
|
45
|
+ /**
|
|
|
46
|
+ * Implements React's {@link Component#render()}.
|
|
|
47
|
+ *
|
|
|
48
|
+ * @inheritdoc
|
|
|
49
|
+ * @returns {ReactElement}
|
|
|
50
|
+ */
|
|
|
51
|
+ render() {
|
|
|
52
|
+ return this.props.children;
|
|
|
53
|
+ }
|
|
|
54
|
+}
|
|
|
55
|
+
|
|
28
|
56
|
/**
|
|
29
|
57
|
* Base (abstract) class for main App component.
|
|
30
|
58
|
*
|
|
|
@@ -201,7 +229,10 @@ export class AbstractApp extends Component {
|
|
201
|
229
|
return (
|
|
202
|
230
|
<I18nextProvider i18n = { i18next }>
|
|
203
|
231
|
<Provider store = { this._getStore() }>
|
|
204
|
|
- { this._createElement(component) }
|
|
|
232
|
+ <Fragment>
|
|
|
233
|
+ { this._createElement(component) }
|
|
|
234
|
+ <OverlayContainer />
|
|
|
235
|
+ </Fragment>
|
|
205
|
236
|
</Provider>
|
|
206
|
237
|
</I18nextProvider>
|
|
207
|
238
|
);
|