123456789101112131415161718192021222324252627282930 |
- // @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));
|