sdy

add routes

1 import React from "react"; 1 import React from "react";
2 import PropTypes from "prop-types"; 2 import PropTypes from "prop-types";
3 -import { Route, Switch, Redirect } from "react-router-dom"; 3 +import { Route, Switch } 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 Main from "./Main/MainPresenter";
6 7
7 const LoggedInRoutes = () => ( 8 const LoggedInRoutes = () => (
8 <Switch> 9 <Switch>
9 - <Route exact path="/" component={RoomList} /> 10 + <Route exact path="/room-list" component={RoomList} />
10 - <Redirect from="*" to="/" />
11 </Switch> 11 </Switch>
12 ); 12 );
13 13
14 const LoggedOutRoutes = () => ( 14 const LoggedOutRoutes = () => (
15 <Switch> 15 <Switch>
16 - <Route exact path="/Auth" component={Auth} /> 16 + <Route exact path="/auth" component={Auth} />
17 - <Redirect from="*" to="/" /> 17 + <Route exact path="/about" component={Main} />
18 + <Route exact path="/features" component={Main} />
19 + <Route exact path="/support" component={Main} />
18 </Switch> 20 </Switch>
19 ); 21 );
20 22
......