jitsi-meet-electron/app/features/app/components/App.js

53 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-05-24 16:35:26 +02:00
// @flow
2018-05-26 23:51:12 +02:00
import { AtlasKitThemeProvider } from '@atlaskit/theme';
2018-05-21 22:06:55 +02:00
import React, { Component } from 'react';
2018-06-03 04:36:16 +02:00
import { Route, Switch } from 'react-router';
import { ConnectedRouter as Router } from 'react-router-redux';
2018-05-21 22:06:55 +02:00
import { Conference } from '../../conference';
import config from '../../config';
2018-06-03 04:36:16 +02:00
import { history } from '../../router';
2018-05-26 23:51:12 +02:00
import { Welcome } from '../../welcome';
2018-05-21 22:06:55 +02:00
/**
* Main component encapsulating the entire application.
*/
2018-05-24 17:04:58 +02:00
export default class App extends Component<*> {
2018-05-21 22:06:55 +02:00
/**
* Initializes a new {@code App} instance.
*
* @inheritdoc
*/
constructor() {
super();
document.title = config.appName;
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
return (
2018-05-26 23:51:12 +02:00
<AtlasKitThemeProvider mode = 'dark'>
2018-06-03 04:36:16 +02:00
<Router history = { history }>
2018-05-26 23:51:12 +02:00
<Switch>
<Route
component = { Welcome }
2018-06-07 09:47:42 +02:00
exact = { true }
2018-05-26 23:51:12 +02:00
path = '/' />
<Route
component = { Conference }
path = '/:domain?/:room' />
</Switch>
</Router>
</AtlasKitThemeProvider>
2018-05-21 22:06:55 +02:00
);
}
}