bigbluebutton-Github/bigbluebutton-html5/imports/startup/client/routes.js

26 lines
940 B
JavaScript
Raw Normal View History

2016-04-29 03:02:51 +08:00
import React from 'react';
import { Router, Route, Redirect, IndexRoute, browserHistory } from 'react-router';
// route components
import AppContainer from '../../ui/app/AppContainer.jsx';
import UserListContainer from '../../ui/user-list/UserListContainer.jsx';
import ChatContainer from '../../ui/chat/ChatContainer.jsx';
import NotFoundPage from '../../ui/not-found/NotFoundPage.jsx';
import NavbarContainer from '../../ui/navbar/NavbarContainer.jsx';
export const renderRoutes = () => (
<Router history={browserHistory}>
<Route path="/html5client" component={AppContainer}>
<IndexRoute components={{}}/>
<Route name="users" path="users" components={{sidebar: UserListContainer}}>
<Route name="chat" path="chat/:chatID" component={ChatContainer}/>
<Redirect from="chat" to="/html5client/users/chat/public" />
</Route>
<Redirect from="*" to="/html5client" />
</Route>
</Router>
);