sdy

update Router

...@@ -3,21 +3,17 @@ import PropTypes from "prop-types"; ...@@ -3,21 +3,17 @@ import PropTypes from "prop-types";
3 import { Route, Switch, Redirect } from "react-router-dom"; 3 import { Route, Switch, Redirect } from "react-router-dom";
4 import Auth from "./Auth/AuthContainer"; 4 import Auth from "./Auth/AuthContainer";
5 import RoomList from "./Room/RoomContainer"; 5 import RoomList from "./Room/RoomContainer";
6 -import Chat from "./Chat/ChatContainer";
7 6
8 const LoggedInRoutes = () => ( 7 const LoggedInRoutes = () => (
9 <Switch> 8 <Switch>
10 <Route exact path="/" component={RoomList} /> 9 <Route exact path="/" component={RoomList} />
11 - <Route exact path="/:roomname" component={Chat} />
12 - <Route path="/:roomname/People" component={Chat} />
13 - <Route path="/:roomname/:categoryName" component={Chat} />
14 <Redirect from="*" to="/" /> 10 <Redirect from="*" to="/" />
15 </Switch> 11 </Switch>
16 ); 12 );
17 13
18 const LoggedOutRoutes = () => ( 14 const LoggedOutRoutes = () => (
19 <Switch> 15 <Switch>
20 - <Route exact path="/" component={Auth} /> 16 + <Route exact path="/Auth" component={Auth} />
21 <Redirect from="*" to="/" /> 17 <Redirect from="*" to="/" />
22 </Switch> 18 </Switch>
23 ); 19 );
......