2023-03-21 09:47:52 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
2023-05-02 11:09:38 +03:00
|
|
|
import { IReduxState } from '../../../app/types';
|
2023-04-03 13:49:19 +03:00
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
|
|
|
import { isLocalParticipantModerator } from '../../../base/participants/functions';
|
2019-01-05 17:49:21 +01:00
|
|
|
import AbstractKickButton from '../AbstractKickButton';
|
2018-12-19 19:40:17 +01:00
|
|
|
|
|
|
|
|
/**
|
2019-06-19 15:32:09 +02:00
|
|
|
* Maps part of the Redux state to the props of this component.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} state - The Redux state.
|
|
|
|
|
* @returns {Props}
|
2018-12-19 19:40:17 +01:00
|
|
|
*/
|
2023-05-02 11:09:38 +03:00
|
|
|
function _mapStateToProps(state: IReduxState) {
|
2019-06-19 15:32:09 +02:00
|
|
|
return {
|
|
|
|
|
visible: isLocalParticipantModerator(state)
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps)(AbstractKickButton));
|