You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SpeakerStatsButton.tsx 923B

12345678910111213141516171819202122232425262728293031
  1. import { connect } from 'react-redux';
  2. import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
  3. import { sendAnalytics } from '../../../analytics/functions';
  4. import { openDialog } from '../../../base/dialog/actions';
  5. import { translate } from '../../../base/i18n/functions';
  6. import AbstractSpeakerStatsButton from '../AbstractSpeakerStatsButton';
  7. import SpeakerStats from './SpeakerStats';
  8. /**
  9. * Implementation of a button for opening speaker stats dialog.
  10. */
  11. class SpeakerStatsButton extends AbstractSpeakerStatsButton {
  12. /**
  13. * Handles clicking / pressing the button, and opens the appropriate dialog.
  14. *
  15. * @protected
  16. * @returns {void}
  17. */
  18. _handleClick() {
  19. const { dispatch } = this.props;
  20. sendAnalytics(createToolbarEvent('speaker.stats'));
  21. dispatch(openDialog(SpeakerStats));
  22. }
  23. }
  24. export default translate(connect()(SpeakerStatsButton));