298927cf4f
Conflicts: bigbluebutton-html5/collections/collections.js bigbluebutton-html5/imports/api/meetings/server/meetings.js bigbluebutton-html5/imports/startup/server/collectionManagers/poll.js bigbluebutton-html5/imports/startup/server/eventHandlers.js bigbluebutton-html5/imports/startup/server/helpers.js bigbluebutton-html5/imports/startup/server/meteorMethods/publishVoteMessage.js bigbluebutton-html5/imports/startup/server/publish.js bigbluebutton-html5/imports/ui/components/app/AppService.js bigbluebutton-html5/server/server.js
37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
import React from 'react';
|
|
import { Router, Route, Redirect, IndexRoute,
|
|
IndexRedirect, useRouterHistory } from 'react-router';
|
|
import { createHistory } from 'history';
|
|
|
|
// route components
|
|
import AppContainer from '../../ui/components/app/AppContainer.jsx';
|
|
import { AppService } from '../../ui/components/app/AppService.js';
|
|
import UserListContainer from '../../ui/components/user-list/UserListContainer.jsx';
|
|
import ChatContainer from '../../ui/components/chat/ChatContainer.jsx';
|
|
|
|
const browserHistory = useRouterHistory(createHistory)({
|
|
basename: '/html5client'
|
|
});
|
|
|
|
export const renderRoutes = () => (
|
|
<Router history={browserHistory}>
|
|
<Route path="/join/:meetingID/:userID/:authToken" onEnter={AppService.setCredentials}>
|
|
<IndexRedirect to="/" />
|
|
<Route path="/" component={AppContainer} onEnter={AppService.subscribeForData} >
|
|
<IndexRoute components={{}} />
|
|
|
|
<Route name="users" path="users" components={{
|
|
userList: UserListContainer
|
|
}} />
|
|
|
|
<Route name="chat" path="users/chat/:chatID" components={{
|
|
userList: UserListContainer,
|
|
chat: ChatContainer,
|
|
}} />
|
|
<Redirect from="users/chat" to="/users/chat/public" />
|
|
</Route>
|
|
<Redirect from="*" to="/" />
|
|
</Route>
|
|
</Router>
|
|
);
|