You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BlankPage.native.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // @flow
  2. import React, { Component } from 'react';
  3. import { connect } from 'react-redux';
  4. import type { Dispatch } from 'redux';
  5. import { destroyLocalTracks } from '../../base/tracks';
  6. import { NetworkActivityIndicator } from '../../mobile/network-activity';
  7. import LocalVideoTrackUnderlay from './LocalVideoTrackUnderlay';
  8. /**
  9. * The type of React {@code Component} props of {@link BlankPage}.
  10. */
  11. type Props = {
  12. dispatch: Dispatch<*>
  13. };
  14. /**
  15. * The React {@code Component} displayed by {@code AbstractApp} when it has no
  16. * {@code Route} to render. Renders a progress indicator when there are ongoing
  17. * network requests.
  18. */
  19. class BlankPage extends Component<Props> {
  20. /**
  21. * Destroys the local tracks (if any) since no media is desired when this
  22. * component is rendered.
  23. *
  24. * @inheritdoc
  25. * @returns {void}
  26. */
  27. componentWillMount() {
  28. this.props.dispatch(destroyLocalTracks());
  29. }
  30. /**
  31. * Implements React's {@link Component#render()}.
  32. *
  33. * @inheritdoc
  34. * @returns {ReactElement}
  35. */
  36. render() {
  37. return (
  38. <LocalVideoTrackUnderlay>
  39. <NetworkActivityIndicator />
  40. </LocalVideoTrackUnderlay>
  41. );
  42. }
  43. }
  44. export default connect()(BlankPage);