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.

DialInInfoApp.web.js 1.0KB

123456789101112131415161718192021222324252627282930
  1. import React from 'react';
  2. import ReactDOM from 'react-dom';
  3. import { I18nextProvider } from 'react-i18next';
  4. import { i18next } from '../../../base/i18n';
  5. import { isMobileBrowser } from '../../../base/environment/utils';
  6. import { parseURLParams } from '../../../base/util/parseURLParams';
  7. import { DialInSummary } from '../dial-in-summary';
  8. import NoRoomError from './NoRoomError';
  9. document.addEventListener('DOMContentLoaded', () => {
  10. const { room } = parseURLParams(window.location, true, 'search');
  11. ReactDOM.render(
  12. <I18nextProvider i18n = { i18next }>
  13. { room
  14. ? <DialInSummary
  15. className = 'dial-in-page'
  16. clickableNumbers = { isMobileBrowser() }
  17. room = { decodeURIComponent(room) } />
  18. : <NoRoomError className = 'dial-in-page' /> }
  19. </I18nextProvider>,
  20. document.getElementById('react')
  21. );
  22. });
  23. window.addEventListener('beforeunload', () => {
  24. ReactDOM.unmountComponentAtNode(document.getElementById('react'));
  25. });