feat: implement login

This commit is contained in:
caturbgs
2021-12-09 23:00:56 +07:00
parent b346e1fdbd
commit 84d3085c0c
8 changed files with 124 additions and 152 deletions

View File

@@ -2,15 +2,16 @@ import {Redirect, Route, Switch} from "react-router-dom";
import {Login} from "../pages/Login/Login";
import {PublicRoute} from "../component/PublicRoute";
import {App} from "../pages/App/App";
import {PrivateRoute} from "../component/PrivateRoute";
export const MainRoutes = (props) => {
return (
<Switch>
<Route path="/" exact>
<Redirect to={"/app/home"}/>
<Redirect to={"/login"}/>
</Route>
<PublicRoute restricted={true} component={Login} path="/login" exact/>
<PublicRoute component={App} path="/app"/>
<PrivateRoute component={App} path="/app"/>
</Switch>
);
};