2020-04-01 07:47:51 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import { translate } from '../../../../base/i18n';
|
2021-02-24 09:37:14 +00:00
|
|
|
import { connect } from '../../../../base/redux';
|
2020-04-01 07:47:51 +00:00
|
|
|
import { getDialInfoPageURL } from '../../../functions';
|
|
|
|
|
|
|
|
import DialInNumber from './DialInNumber';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The object representing the dialIn feature.
|
|
|
|
*/
|
2021-02-24 09:37:14 +00:00
|
|
|
_dialIn: Object,
|
2020-04-01 07:47:51 +00:00
|
|
|
|
|
|
|
/**
|
2021-02-24 09:37:14 +00:00
|
|
|
* The url of the page containing the dial-in numbers list.
|
2020-04-01 07:47:51 +00:00
|
|
|
*/
|
2021-02-24 09:37:14 +00:00
|
|
|
_dialInfoPageUrl: string,
|
2020-04-01 07:47:51 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The phone number to dial to begin the process of dialing into a
|
|
|
|
* conference.
|
|
|
|
*/
|
|
|
|
phoneNumber: string,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoked to obtain translated strings.
|
|
|
|
*/
|
|
|
|
t: Function
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a ReactElement for showing how to dial into the conference, if
|
|
|
|
* dialing in is available.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {null|ReactElement}
|
|
|
|
*/
|
|
|
|
function DialInSection({
|
2021-02-24 09:37:14 +00:00
|
|
|
_dialIn,
|
|
|
|
_dialInfoPageUrl,
|
2020-04-01 07:47:51 +00:00
|
|
|
phoneNumber,
|
|
|
|
t
|
|
|
|
}: Props) {
|
|
|
|
return (
|
|
|
|
<div className = 'invite-more-dialog dial-in-display'>
|
|
|
|
<DialInNumber
|
2021-02-24 09:37:14 +00:00
|
|
|
conferenceID = { _dialIn.conferenceID }
|
2020-04-01 07:47:51 +00:00
|
|
|
phoneNumber = { phoneNumber } />
|
2021-02-27 04:30:31 +00:00
|
|
|
<a
|
2020-04-01 07:47:51 +00:00
|
|
|
className = 'more-numbers'
|
2021-02-24 09:37:14 +00:00
|
|
|
href = { _dialInfoPageUrl }
|
2020-04-01 07:47:51 +00:00
|
|
|
rel = 'noopener noreferrer'
|
|
|
|
target = '_blank'>
|
|
|
|
{ t('info.moreNumbers') }
|
2021-02-27 04:30:31 +00:00
|
|
|
</a>
|
2020-04-01 07:47:51 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-02-24 09:37:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps (parts of) the Redux state to the associated props for the
|
|
|
|
* {@code DialInLink} component.
|
|
|
|
*
|
|
|
|
* @param {Object} state - The Redux state.
|
|
|
|
* @private
|
|
|
|
* @returns {Props}
|
|
|
|
*/
|
|
|
|
function _mapStateToProps(state) {
|
|
|
|
return {
|
|
|
|
_dialIn: state['features/invite'],
|
|
|
|
_dialInfoPageUrl: getDialInfoPageURL(state)
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps)(DialInSection));
|