App.js 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. import './App.scss';
  2. import {Router, Route, Link, Redirect} from 'react-router-dom';
  3. import createHistory from "history/createBrowserHistory";
  4. import MainPage from "./pages/MainPage";
  5. import Page404 from "./pages/404Page";
  6. import ContactPage from "./pages/ContactPage";
  7. import Switch from "react-router-dom/es/Switch";
  8. import PrivacyPolicy from "./pages/PrivacyPolicyPage";
  9. import FAQPage from "./pages/FAQPage";
  10. import OurTeamPage from "./pages/OurTeamPage";
  11. import AboutUsPage from "./pages/AboutUsPage";
  12. const history = createHistory();
  13. function App() {
  14. return (
  15. <Router history={history}>
  16. <Switch>
  17. <Route path="/" component={MainPage} exact/>
  18. <Route path="/about-us" component={AboutUsPage} />
  19. <Route path="/our-team" component={OurTeamPage} />
  20. <Route path="/faq" component={FAQPage} />
  21. <Route path="/contact" component={ContactPage} />
  22. <Route path="/privacy-policy" component={PrivacyPolicy} />
  23. <Route path="*" component={Page404} />
  24. </Switch>
  25. </Router>
  26. )
  27. }
  28. export default App;