Files
jitsi-meet/react/features/video-menu/components/native/MuteButton.js

24 lines
720 B
JavaScript
Raw Normal View History

2018-12-19 19:40:17 +01:00
// @flow
import { connect } from 'react-redux';
2018-12-19 19:40:17 +01:00
import { translate } from '../../../base/i18n';
2019-06-19 15:32:09 +02:00
import { isLocalParticipantModerator } from '../../../base/participants';
import AbstractMuteButton, { _mapStateToProps as _abstractMapStateToProps } from '../AbstractMuteButton';
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.
* @param {Object} ownProps - Properties of component.
* @returns {Props}
2018-12-19 19:40:17 +01:00
*/
2019-06-19 15:32:09 +02:00
function _mapStateToProps(state, ownProps) {
return {
..._abstractMapStateToProps(state, ownProps),
visible: isLocalParticipantModerator(state)
};
}
2019-01-05 17:49:21 +01:00
export default translate(connect(_mapStateToProps)(AbstractMuteButton));