// @flow import React from 'react'; import { Avatar } from '../../../base/avatar'; import { translate } from '../../../base/i18n'; import { connect } from '../../../base/redux'; import { isToolboxVisible } from '../../../toolbox/functions.web'; import AbstractKnockingParticipantList, { mapStateToProps as abstractMapStateToProps, type Props as AbstractProps } from '../AbstractKnockingParticipantList'; type Props = AbstractProps & { /** * True if the toolbox is visible, so we need to adjust the position. */ _toolboxVisible: boolean, }; /** * Component to render a list for the actively knocking participants. */ class KnockingParticipantList extends AbstractKnockingParticipantList { /** * Implements {@code PureComponent#render}. * * @inheritdoc */ render() { const { _participants, _toolboxVisible, _visible, t } = this.props; if (!_visible) { return null; } return (
{ t('lobby.knockingParticipantList') }
); } _onRespondToParticipant: (string, boolean) => Function; } /** * Maps part of the Redux state to the props of this component. * * @param {Object} state - The Redux state. * @returns {Props} */ function _mapStateToProps(state: Object): $Shape { return { ...abstractMapStateToProps(state), _toolboxVisible: isToolboxVisible(state) }; } export default translate(connect(_mapStateToProps)(KnockingParticipantList));