2017-12-13 03:58:33 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React, { Component } from 'react';
|
2019-03-21 16:38:29 +00:00
|
|
|
|
|
|
|
import { connect } from '../../../base/redux';
|
2017-12-13 03:58:33 +00:00
|
|
|
|
|
|
|
import CalleeInfo from './CalleeInfo';
|
|
|
|
|
|
|
|
/**
|
2017-11-24 15:23:40 +00:00
|
|
|
* The type of the React {@code Component} props of {@code CalleeInfoContainer}.
|
2017-12-13 03:58:33 +00:00
|
|
|
*/
|
|
|
|
type Props = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The indicator which determines whether {@code CalleeInfo} is to be
|
|
|
|
* rendered.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
*/
|
|
|
|
_calleeInfoVisible: boolean
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements a React {@link Component} which depicts the establishment of a
|
|
|
|
* call with a specific remote callee if there is such a remote callee.
|
|
|
|
*
|
2021-11-04 21:10:43 +00:00
|
|
|
* @augments Component
|
2017-12-13 03:58:33 +00:00
|
|
|
*/
|
|
|
|
class CalleeInfoContainer extends Component<Props> {
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return this.props._calleeInfoVisible ? <CalleeInfo /> : null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps parts of the redux state to {@link CalleeInfoContainer} (React
|
|
|
|
* {@code Component}) props.
|
|
|
|
*
|
|
|
|
* @param {Object} state - The redux state of which parts are to be mapped to
|
|
|
|
* {@code CalleeInfoContainer} props.
|
|
|
|
* @private
|
|
|
|
* @returns {{
|
|
|
|
* _calleeInfoVisible: boolean
|
|
|
|
* }}
|
|
|
|
*/
|
|
|
|
function _mapStateToProps(state: Object): Object {
|
|
|
|
return {
|
|
|
|
/**
|
|
|
|
* The indicator which determines whether {@code CalleeInfo} is to be
|
|
|
|
* rendered.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @type {boolean}
|
|
|
|
*/
|
2018-06-26 22:56:22 +00:00
|
|
|
_calleeInfoVisible: state['features/invite'].calleeInfoVisible
|
2017-12-13 03:58:33 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(_mapStateToProps)(CalleeInfoContainer);
|