Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ConnectionStatusButton.tsx 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React, { useCallback } from 'react';
  2. import { WithTranslation } from 'react-i18next';
  3. import { connect } from 'react-redux';
  4. import { IStore } from '../../../app/types';
  5. import { translate } from '../../../base/i18n/functions';
  6. import { IconInfoCircle } from '../../../base/icons/svg';
  7. import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
  8. import { renderConnectionStatus } from '../../actions.web';
  9. interface IProps extends WithTranslation {
  10. /**
  11. * The Redux dispatch function.
  12. */
  13. dispatch: IStore['dispatch'];
  14. /**
  15. * The ID of the participant for which to show connection stats.
  16. */
  17. participantId: string;
  18. }
  19. const ConnectionStatusButton = ({
  20. dispatch,
  21. t
  22. }: IProps) => {
  23. const onClick = useCallback(e => {
  24. e.stopPropagation();
  25. dispatch(renderConnectionStatus(true));
  26. }, [ dispatch ]);
  27. return (
  28. <ContextMenuItem
  29. accessibilityLabel = { t('videothumbnail.connectionInfo') }
  30. icon = { IconInfoCircle }
  31. onClick = { onClick }
  32. text = { t('videothumbnail.connectionInfo') } />
  33. );
  34. };
  35. export default translate(connect()(ConnectionStatusButton));