// @flow import React from 'react'; import { translate } from '../../../base/i18n/functions'; import { connect } from '../../../base/redux/functions'; import AbstractPageReloadOverlay, { type Props, abstractMapStateToProps } from './AbstractPageReloadOverlay'; import OverlayFrame from './OverlayFrame'; /** * Implements a React Component for page reload overlay. Shown before the * conference is reloaded. Shows a warning message and counts down towards the * reload. */ class PageReloadOverlay extends AbstractPageReloadOverlay { /** * Implements React's {@link Component#render()}. * * @inheritdoc * @returns {ReactElement} */ render() { const { isNetworkFailure, t } = this.props; const { message, timeLeft, title } = this.state; return (
{ t(title) } { t(message, { seconds: timeLeft }) } { this._renderProgressBar() } { this._renderButton() }
); } _renderButton: () => React$Element<*>; _renderProgressBar: () => React$Element<*>; } export default translate(connect(abstractMapStateToProps)(PageReloadOverlay));