2019-04-11 04:51:06 +08:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { injectIntl, defineMessages, intlShape } from 'react-intl';
|
|
|
|
import { styles } from './styles';
|
|
|
|
|
|
|
|
const intlMessages = defineMessages({
|
|
|
|
audioDialDescription: {
|
|
|
|
id: 'app.audioDial.audioDialDescription',
|
|
|
|
description: 'Text decription for the audio help',
|
|
|
|
},
|
|
|
|
audioDialConfrenceText: {
|
|
|
|
id: 'app.audioDial.audioDialConfrenceText',
|
|
|
|
description: 'audio settings back button label',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
const propTypes = {
|
|
|
|
intl: intlShape.isRequired,
|
2019-04-16 00:39:36 +08:00
|
|
|
formattedDialNum: PropTypes.string.isRequired,
|
2019-04-11 04:51:06 +08:00
|
|
|
telVoice: PropTypes.string.isRequired,
|
|
|
|
};
|
|
|
|
|
|
|
|
class AudioDial extends React.PureComponent {
|
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
intl,
|
2019-04-16 00:39:36 +08:00
|
|
|
formattedDialNum,
|
2019-04-11 04:51:06 +08:00
|
|
|
telVoice,
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<span className={styles.help}>
|
|
|
|
<div className={styles.text}>
|
|
|
|
{intl.formatMessage(intlMessages.audioDialDescription)}
|
|
|
|
</div>
|
2019-04-16 00:39:36 +08:00
|
|
|
<div className={styles.dialText}>{formattedDialNum}</div>
|
2019-04-11 04:51:06 +08:00
|
|
|
<div className={styles.conferenceText}>
|
|
|
|
{intl.formatMessage(intlMessages.audioDialConfrenceText)}
|
|
|
|
</div>
|
|
|
|
<div className={styles.telvoice}>{telVoice}</div>
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
AudioDial.propTypes = propTypes;
|
|
|
|
export default injectIntl(AudioDial);
|