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

37 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-05-14 00:01:30 +03:00
import React, { Suspense } from "react";
2020-04-14 10:53:19 +03:00
import { Route, Switch } from "react-router-dom";
import HomePage from "./home/HomePage";
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-14 15:29:32 +03:00
import ReleaseNotesContainer from "../features/releaseNotes/components/ReleaseNotesContainer";
2020-05-15 00:04:27 +03:00
import AboutContainer from "../features/about/components/AboutContainer";
2020-05-13 22:51:15 +03:00
2020-05-13 23:45:16 +03:00
function App() {
const contentStyle = {
2020-05-14 00:01:30 +03:00
paddingLeft: "30px",
paddingRight: "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-14 00:01:30 +03:00
<Suspense fallback={<div></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} />
2020-05-15 00:04:27 +03:00
<Route path="/about" component={AboutContainer} />
2020-05-13 22:51:15 +03:00
<Route path="/sessions" component={SessionContainer} />
2020-05-14 15:29:32 +03:00
<Route path="/release-notes" component={ReleaseNotesContainer} />
2020-05-13 22:51:15 +03:00
<Route component={PageNotFound} />
</Switch>
<ToastContainer autoClose={3000} />
2020-05-13 23:45:16 +03:00
</div>
2020-05-14 00:01:30 +03:00
</Suspense>
2020-04-14 10:53:19 +03:00
);
}
export default App;