reverse-proxy-frontend/src/components/App.js

35 lines
961 B
JavaScript
Raw Normal View History

2020-04-14 10:53:19 +03:00
import React from "react";
import { Route, Switch } from "react-router-dom";
import HomePage from "./home/HomePage";
import AboutPage from "./about/AboutPage";
2020-05-13 19:25:14 +03:00
import Header from "./layout/Header";
2020-04-14 10:53:19 +03:00
import PageNotFound from "./PageNotFound";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
2020-05-12 02:31:25 +03:00
import SessionContainer from "../features/session/components/SessionContainer";
2020-05-13 22:51:15 +03:00
2020-05-13 23:45:16 +03:00
function App() {
const contentStyle = {
2020-05-13 22:51:15 +03:00
"padding-left": "30px",
"padding-right": "30px"
2020-05-13 23:45:16 +03:00
};
2020-05-13 22:51:15 +03:00
2020-04-14 10:53:19 +03:00
return (
2020-05-12 02:48:18 +03:00
<div>
2020-04-14 10:53:19 +03:00
<Header />
2020-05-13 19:25:14 +03:00
<br />
2020-05-13 23:45:16 +03:00
<div style={contentStyle}>
2020-05-13 22:51:15 +03:00
<Switch>
<Route exact path="/" component={HomePage} />
<Route path="/about" component={AboutPage} />
<Route path="/sessions" component={SessionContainer} />
<Route component={PageNotFound} />
</Switch>
<ToastContainer autoClose={3000} />
2020-05-13 23:45:16 +03:00
</div>
2020-04-14 10:53:19 +03:00
</div>
);
}
export default App;