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.

ShowDialInInfoButton.native.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // @flow
  2. import { translate } from '../../base/i18n';
  3. import { IconInfoCircle } from '../../base/icons';
  4. import { connect } from '../../base/redux';
  5. import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
  6. import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';
  7. import { screen } from '../../mobile/navigation/routes';
  8. export type Props = AbstractButtonProps & {
  9. /**
  10. * The redux {@code dispatch} function.
  11. */
  12. dispatch: Function,
  13. /**
  14. * The ID of the entry to be deleted.
  15. */
  16. itemId: Object,
  17. /**
  18. * The function to be used to translate i18n labels.
  19. */
  20. t: Function
  21. };
  22. /**
  23. * A recent list menu button which opens the dial-in info dialog.
  24. */
  25. class ShowDialInInfoButton extends AbstractButton<Props, *> {
  26. accessibilityLabel = 'welcomepage.info';
  27. icon = IconInfoCircle;
  28. label = 'welcomepage.info';
  29. /**
  30. * Handles clicking / pressing the button.
  31. *
  32. * @private
  33. * @returns {void}
  34. */
  35. _handleClick() {
  36. const { itemId } = this.props;
  37. navigateRoot(screen.dialInSummary, {
  38. summaryUrl: itemId.url
  39. });
  40. }
  41. }
  42. export default translate(connect()(ShowDialInInfoButton));