diff --git a/react/features/conference/components/Conference.web.js b/react/features/conference/components/Conference.web.js index 4a3d17dfe..5a3cc838e 100644 --- a/react/features/conference/components/Conference.web.js +++ b/react/features/conference/components/Conference.web.js @@ -13,6 +13,7 @@ import { CalleeInfoContainer } from '../../invite'; import { LargeVideo } from '../../large-video'; import { NotificationsContainer } from '../../notifications'; import { SidePanel } from '../../side-panel'; +import { default as Notice } from './Notice'; import { Toolbox, fullScreenChanged, @@ -163,6 +164,7 @@ class Conference extends Component {
+
diff --git a/react/features/conference/components/Notice.naive.js b/react/features/conference/components/Notice.naive.js new file mode 100644 index 000000000..e69de29bb diff --git a/react/features/conference/components/Notice.web.js b/react/features/conference/components/Notice.web.js new file mode 100644 index 000000000..acaee877b --- /dev/null +++ b/react/features/conference/components/Notice.web.js @@ -0,0 +1,61 @@ +/* @flow */ + +import React, { Component } from 'react'; +import { connect } from 'react-redux'; + +import { translate } from '../../base/i18n'; + +declare var config: Object; + +type Props = { + _message?: string, +}; + +/** + * Notice react component. + * + * @class Notice + */ +class Notice extends Component { + + /** + * Implements React's {@link Component#render()}. + * + * @inheritdoc + * @returns {ReactElement} + */ + render() { + if (!this.props._message) { + return null; + } + + return ( +
+ + { this.props._message } + +
+ ); + } +} + +/** + * Maps (parts of) the Redux state to the associated + * {@code Notice}'s props. + * + * @param {Object} state - The Redux state. + * @private + * @returns {{ + * _message: string, + * }} + */ +function _mapStateToProps(state) { + const { + noticeMessage + } = state['features/base/config']; + + return { + _message: noticeMessage + }; +} +export default translate(connect(_mapStateToProps)(Notice)); diff --git a/react/features/conference/components/index.js b/react/features/conference/components/index.js index 7ee56f548..0910dcaff 100644 --- a/react/features/conference/components/index.js +++ b/react/features/conference/components/index.js @@ -1 +1,3 @@ +// @flow + export { default as Conference } from './Conference';