jiti-meet/react/features/speaker-stats/components/web/SpeakerStatsButton.js

31 lines
850 B
JavaScript
Raw Normal View History

// @flow
import { createToolbarEvent, sendAnalytics } from '../../../analytics';
import { openDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { connect } from '../../../base/redux';
import AbstractSpeakerStatsButton from '../AbstractSpeakerStatsButton';
import { SpeakerStats } from './';
/**
* Implementation of a button for opening speaker stats dialog.
*/
class SpeakerStatsButton extends AbstractSpeakerStatsButton {
/**
* Handles clicking / pressing the button, and opens the appropriate dialog.
*
* @protected
* @returns {void}
*/
_handleClick() {
const { dispatch } = this.props;
sendAnalytics(createToolbarEvent('speaker.stats'));
dispatch(openDialog(SpeakerStats));
}
}
export default translate(connect()(SpeakerStatsButton));