App.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import {Router, Route} from 'react-router-dom';
  2. import createHistory from "history/createBrowserHistory";
  3. import MainPage from "./pages/MainPage";
  4. import Page404 from "./pages/404Page";
  5. import ContactPage from "./pages/ContactPage";
  6. import Switch from "react-router-dom/es/Switch";
  7. import PrivacyPolicy from "./pages/PrivacyPolicyPage";
  8. import FAQPage from "./pages/FAQPage";
  9. import OurTeamPage from "./pages/OurTeamPage";
  10. import AboutUsPage from "./pages/AboutUsPage";
  11. import {Provider} from "react-redux";
  12. import MyAccountPage from "./pages/MyAccountPage";
  13. import {store} from "./reducers";
  14. import ProfilePage from "./pages/ProfilePage";
  15. import CatalogPage from "./pages/CatalogPage";
  16. import Header from "./components/Header";
  17. import Footer from "./components/Footer";
  18. const history = createHistory();
  19. function App() {
  20. return (
  21. <Router history={history}>
  22. <Provider store={store}>
  23. <Header/>
  24. <Switch>
  25. <Route path="/" component={MainPage} exact/>
  26. <Route path="/catalog" component={CatalogPage} />
  27. <Route path="/about-us" component={AboutUsPage} />
  28. <Route path="/our-team" component={OurTeamPage} />
  29. <Route path="/faq" component={FAQPage} />
  30. <Route path="/contact" component={ContactPage} />
  31. <Route path="/my-account" component={MyAccountPage} />
  32. <Route path="/privacy-policy" component={PrivacyPolicy} />
  33. <Route path="/profile" component={ProfilePage} />
  34. <Route path="*" component={Page404} />
  35. </Switch>
  36. <Footer/>
  37. </Provider>
  38. </Router>
  39. )
  40. }
  41. export default App;