2018-07-15 16:50:38 +02:00
|
|
|
// @flow
|
|
|
|
|
|
2022-01-14 11:44:02 +01:00
|
|
|
// https://github.com/software-mansion/react-native-gesture-handler/issues/320#issuecomment-443815828
|
|
|
|
|
import 'react-native-gesture-handler';
|
|
|
|
|
|
2020-05-06 11:22:09 +02:00
|
|
|
// Apply all necessary polyfills as early as possible to make sure anything imported henceforth
|
|
|
|
|
// sees them.
|
2021-10-25 12:04:51 +02:00
|
|
|
import 'react-native-get-random-values';
|
2020-05-06 11:22:09 +02:00
|
|
|
import './features/mobile/polyfills';
|
2020-05-06 10:53:23 +02:00
|
|
|
|
2019-01-24 16:53:28 +01:00
|
|
|
import React, { PureComponent } from 'react';
|
|
|
|
|
import { AppRegistry } from 'react-native';
|
2016-10-05 09:36:59 -05:00
|
|
|
|
2020-06-04 16:09:13 +02:00
|
|
|
import { App } from './features/app/components';
|
2019-08-28 12:31:38 +02:00
|
|
|
import { _initLogging } from './features/base/logging/functions';
|
2022-04-05 22:05:36 +02:00
|
|
|
import JitsiThemePaperProvider from './features/base/ui/components/JitsiThemeProvider';
|
2019-05-29 13:58:50 +02:00
|
|
|
|
2018-07-16 11:36:32 -05:00
|
|
|
/**
|
|
|
|
|
* The type of the React {@code Component} props of {@link Root}.
|
|
|
|
|
*/
|
2018-07-15 16:50:38 +02:00
|
|
|
type Props = {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The URL, if any, with which the app was launched.
|
|
|
|
|
*/
|
|
|
|
|
url: Object | string
|
|
|
|
|
};
|
|
|
|
|
|
2016-10-05 09:36:59 -05:00
|
|
|
/**
|
|
|
|
|
* React Native doesn't support specifying props to the main/root component (in
|
|
|
|
|
* the JS/JSX source code). So create a wrapper React Component (class) around
|
|
|
|
|
* features/app's App instead.
|
|
|
|
|
*
|
2021-11-04 22:10:43 +01:00
|
|
|
* @augments Component
|
2016-10-05 09:36:59 -05:00
|
|
|
*/
|
2019-01-24 16:53:28 +01:00
|
|
|
class Root extends PureComponent<Props> {
|
2016-10-05 09:36:59 -05:00
|
|
|
/**
|
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
|
*
|
|
|
|
|
* @inheritdoc
|
|
|
|
|
* @returns {ReactElement}
|
|
|
|
|
*/
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
2021-05-12 19:13:03 +03:00
|
|
|
<JitsiThemePaperProvider>
|
|
|
|
|
<App
|
|
|
|
|
{ ...this.props } />
|
|
|
|
|
</JitsiThemePaperProvider>
|
2016-10-05 09:36:59 -05:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-28 12:31:38 +02:00
|
|
|
// Initialize logging.
|
|
|
|
|
_initLogging();
|
|
|
|
|
|
2018-07-16 11:36:32 -05:00
|
|
|
// Register the main/root Component of JitsiMeetView.
|
2016-10-05 09:36:59 -05:00
|
|
|
AppRegistry.registerComponent('App', () => Root);
|