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.

ConferenceID.js 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // @flow
  2. import React, { Component } from 'react';
  3. import { translate } from '../../../../base/i18n';
  4. import { _formatConferenceIDPin } from '../../../_utils';
  5. /**
  6. * The type of the React {@code Component} props of {@link ConferenceID}.
  7. */
  8. type Props = {
  9. /**
  10. * The conference ID for dialing in.
  11. */
  12. conferenceID: number,
  13. /**
  14. * The name of the conference.
  15. */
  16. conferenceName: ?string,
  17. /**
  18. * Invoked to obtain translated strings.
  19. */
  20. t: Function
  21. };
  22. /**
  23. * Displays a conference ID used as a pin for dialing into a conference.
  24. *
  25. * @extends Component
  26. */
  27. class ConferenceID extends Component<Props> {
  28. /**
  29. * Implements React's {@link Component#render()}.
  30. *
  31. * @inheritdoc
  32. * @returns {ReactElement}
  33. */
  34. render() {
  35. const { conferenceID, conferenceName, t } = this.props;
  36. return (
  37. <div className = 'dial-in-conference-id'>
  38. <div className = 'dial-in-conference-name'>
  39. { conferenceName }
  40. </div>
  41. <div className = 'dial-in-conference-description'>
  42. { t('info.dialANumber') }
  43. </div>
  44. <div className = 'dial-in-conference-pin'>
  45. { `${t('info.dialInConferenceID')} ${_formatConferenceIDPin(conferenceID)}` }
  46. </div>
  47. </div>
  48. );
  49. }
  50. }
  51. export default translate(ConferenceID);