2018-02-13 19:46:47 +00:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import { I18nextProvider } from 'react-i18next';
|
|
|
|
|
|
|
|
import parseURLParams from '../../../base/config/parseURLParams';
|
|
|
|
import { i18next } from '../../../base/i18n';
|
|
|
|
|
2018-02-21 01:25:22 +00:00
|
|
|
import { DialInSummary } from '../dial-in-summary';
|
2018-02-13 19:46:47 +00:00
|
|
|
|
2018-03-07 19:30:16 +00:00
|
|
|
import NoRoomError from './NoRoomError';
|
2019-05-03 09:49:50 +00:00
|
|
|
import { Platform } from '../../../base/react';
|
2018-03-07 19:30:16 +00:00
|
|
|
|
2018-02-13 19:46:47 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
2018-09-07 22:48:58 +00:00
|
|
|
const { room } = parseURLParams(window.location, true, 'search');
|
2019-05-03 09:49:50 +00:00
|
|
|
const OS = Platform.OS;
|
|
|
|
const isUsingMobileBrowser = OS === 'android' || OS === 'ios';
|
2018-02-13 19:46:47 +00:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<I18nextProvider i18n = { i18next }>
|
2018-03-07 19:30:16 +00:00
|
|
|
{ room
|
|
|
|
? <DialInSummary
|
|
|
|
className = 'dial-in-page'
|
2019-05-03 09:49:50 +00:00
|
|
|
clickableNumbers = { isUsingMobileBrowser }
|
2019-07-10 17:27:11 +00:00
|
|
|
room = { decodeURIComponent(room) } />
|
2018-03-07 19:30:16 +00:00
|
|
|
: <NoRoomError className = 'dial-in-page' /> }
|
2018-02-13 19:46:47 +00:00
|
|
|
</I18nextProvider>,
|
|
|
|
document.getElementById('react')
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
window.addEventListener('beforeunload', () => {
|
|
|
|
ReactDOM.unmountComponentAtNode(document.getElementById('react'));
|
|
|
|
});
|