Fix disabled Welcome page broken with the introduction of React

The React-based rewrite looks whether there's a room name (in the
window's location) in order to choose between WelcomePage and
Conference. But app.js expects Conference to be rendered before it
builds a room name if WelcomePage is disabled and there's no room name.
A quick and dirty workaround is to render Conference within WelcomePage
so that the rendered result closely resembles index.html before the
React-based rewrite.
This commit is contained in:
Lyubomir Marinov
2016-11-30 19:54:09 -06:00
parent 9f26270a98
commit bdc67201e2
2 changed files with 30 additions and 18 deletions
@@ -1,5 +1,7 @@
import React, { Component } from 'react';
import { Conference } from '../../conference';
/**
* The web container rendering the welcome page.
*/
@@ -12,14 +14,23 @@ export default class WelcomePage extends Component {
* @returns {ReactElement|null}
*/
render() {
// FIXME The rendering of Conference bellow is a very quick and dirty
// temporary fix for the following issue: when the WelcomePage is
// disabled, app.js expects Conference to be rendered already and only
// then it builds a room name but the App component expects the room
// name to be built already (by looking at the window's location) in
// order to choose between WelcomePage and Conference.
return (
<div id = 'welcome_page'>
{
this._renderHeader()
}
{
this._renderMain()
}
<div>
<div id = 'welcome_page'>
{
this._renderHeader()
}
{
this._renderMain()
}
</div>
<Conference />
</div>
);
}