您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

SpeakerStatsButton.js 850B

123456789101112131415161718192021222324252627282930
  1. // @flow
  2. import { createToolbarEvent, sendAnalytics } from '../../../analytics';
  3. import { openDialog } from '../../../base/dialog';
  4. import { translate } from '../../../base/i18n';
  5. import { connect } from '../../../base/redux';
  6. import AbstractSpeakerStatsButton from '../AbstractSpeakerStatsButton';
  7. import { SpeakerStats } from './';
  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));