jiti-meet/react/features/welcome/components/BlankPage.native.js

53 lines
1.3 KiB
JavaScript
Raw Normal View History

// @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { destroyLocalTracks } from '../../base/tracks';
import { NetworkActivityIndicator } from '../../mobile/network-activity';
import LocalVideoTrackUnderlay from './LocalVideoTrackUnderlay';
/**
2018-07-12 03:57:44 +00:00
* The type of React {@code Component} props of {@link BlankPage}.
*/
type Props = {
2019-03-19 15:42:25 +00:00
dispatch: Dispatch<any>
2018-07-12 03:57:44 +00:00
};
/**
* The React {@code Component} displayed by {@code AbstractApp} when it has no
* {@code Route} to render. Renders a progress indicator when there are ongoing
* network requests.
*/
class BlankPage extends Component<Props> {
/**
* Destroys the local tracks (if any) since no media is desired when this
* component is rendered.
*
* @inheritdoc
* @returns {void}
*/
componentDidMount() {
this.props.dispatch(destroyLocalTracks());
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
return (
2018-02-02 14:50:16 +00:00
<LocalVideoTrackUnderlay>
<NetworkActivityIndicator />
</LocalVideoTrackUnderlay>
);
}
}
2019-03-19 15:42:25 +00:00
// $FlowExpectedError
export default connect()(BlankPage);