2022-11-22 13:56:37 +00:00
|
|
|
import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
|
|
|
|
import { sendAnalytics } from '../../../analytics/functions';
|
|
|
|
import { openDialog } from '../../../base/dialog/actions';
|
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
|
|
import { connect } from '../../../base/redux/functions';
|
2021-11-10 17:49:53 +00:00
|
|
|
import AbstractSpeakerStatsButton from '../AbstractSpeakerStatsButton';
|
|
|
|
|
2022-11-22 13:56:37 +00:00
|
|
|
import SpeakerStats from './SpeakerStats';
|
|
|
|
|
2021-11-10 17:49:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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-11-22 13:56:37 +00:00
|
|
|
// @ts-ignore
|
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));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-22 13:56:37 +00:00
|
|
|
// @ts-ignore
|
2021-11-10 17:49:53 +00:00
|
|
|
export default translate(connect()(SpeakerStatsButton));
|