Files
jitsi-meet/react/features/speaker-stats/components/web/SpeakerStatsButton.tsx
Robert Pintilii 29945f4809 ref(TS) Improve TS (#13120)
Remove unnecessary @ts-ignore
Fix some TS errors
2023-03-29 10:16:54 +03:00

32 lines
923 B
TypeScript

import { connect } from 'react-redux';
import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../../analytics/functions';
import { openDialog } from '../../../base/dialog/actions';
import { translate } from '../../../base/i18n/functions';
import AbstractSpeakerStatsButton from '../AbstractSpeakerStatsButton';
import SpeakerStats from './SpeakerStats';
/**
* 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));