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 UserListContainer from '../../ui/components/user-list/UserListContainer.jsx'; import ChatContainer from '../../ui/components/chat/ChatContainer.jsx'; const browserHistory = useRouterHistory(createHistory)({ basename: '/html5client' }); const setCredentials = function (nextState, replace) { const meetingID = nextState.params.meetingID; const userID = nextState.params.userID; const authToken = nextState.params.authToken; if (!!meetingID) localStorage.setItem('meetingID', meetingID); if (!!userID) localStorage.setItem('userID', userID); if (!!authToken) localStorage.setItem('authToken', authToken); }; export const renderRoutes = () => ( );