2021-11-10 17:49:53 +00:00
|
|
|
// @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() {
|
2022-01-04 11:21:00 +00:00
|
|
|
const { dispatch } = this.props;
|
2021-11-10 17:49:53 +00:00
|
|
|
|
|
|
|
sendAnalytics(createToolbarEvent('speaker.stats'));
|
|
|
|
dispatch(openDialog(SpeakerStats));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect()(SpeakerStatsButton));
|