2020-09-08 16:06:06 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { translate } from '../../base/i18n';
|
2022-11-08 10:24:32 +00:00
|
|
|
import { IconInfoCircle } from '../../base/icons';
|
2020-09-08 16:06:06 +00:00
|
|
|
import { connect } from '../../base/redux';
|
|
|
|
import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
|
2022-01-25 12:55:57 +00:00
|
|
|
import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';
|
|
|
|
import { screen } from '../../mobile/navigation/routes';
|
2020-09-08 16:06:06 +00:00
|
|
|
|
|
|
|
export type Props = AbstractButtonProps & {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The redux {@code dispatch} function.
|
|
|
|
*/
|
|
|
|
dispatch: Function,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The ID of the entry to be deleted.
|
|
|
|
*/
|
|
|
|
itemId: Object,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The function to be used to translate i18n labels.
|
|
|
|
*/
|
|
|
|
t: Function
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A recent list menu button which opens the dial-in info dialog.
|
|
|
|
*/
|
|
|
|
class ShowDialInInfoButton extends AbstractButton<Props, *> {
|
|
|
|
accessibilityLabel = 'welcomepage.info';
|
2022-11-08 10:24:32 +00:00
|
|
|
icon = IconInfoCircle;
|
2020-09-08 16:06:06 +00:00
|
|
|
label = 'welcomepage.info';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles clicking / pressing the button.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_handleClick() {
|
2021-11-11 14:32:56 +00:00
|
|
|
const { itemId } = this.props;
|
2020-09-08 16:06:06 +00:00
|
|
|
|
2022-01-25 12:55:57 +00:00
|
|
|
navigateRoot(screen.dialInSummary, {
|
2021-11-11 14:32:56 +00:00
|
|
|
summaryUrl: itemId.url
|
|
|
|
});
|
2020-09-08 16:06:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect()(ShowDialInInfoButton));
|