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

SpeakerStatsButton.tsx 976B

1234567891011121314151617181920212223242526272829303132
  1. import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
  2. import { sendAnalytics } from '../../../analytics/functions';
  3. import { openDialog } from '../../../base/dialog/actions';
  4. import { translate } from '../../../base/i18n/functions';
  5. import { connect } from '../../../base/redux/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. // @ts-ignore
  20. const { dispatch } = this.props;
  21. sendAnalytics(createToolbarEvent('speaker.stats'));
  22. dispatch(openDialog(SpeakerStats));
  23. }
  24. }
  25. // @ts-ignore
  26. export default translate(connect()(SpeakerStatsButton));