| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import React from 'react';
- import { Redirect, Route, Switch } from 'react-router-dom';
-
- import {
- LOGIN_PAGE,
- HOME_PAGE,
- FORGOT_PASSWORD_PAGE,
- NOT_FOUND_PAGE,
- ERROR_PAGE,
- BASE_PAGE,
- FORGOT_PASSWORD_MAIL_SENT,
- REGISTER_PAGE,
- REGISTER_SUCCESSFUL_PAGE,
- RESET_PASSWORD_PAGE,
- CREATE_OFFER_PAGE,
- ITEM_DETAILS_PAGE
- } from './constants/pages';
- import LoginPage from './pages/LoginPage/LoginPageMUI';
- import HomePage from './pages/HomePage/HomePageMUI';
- import NotFoundPage from './pages/ErrorPages/NotFoundPage';
- import ErrorPage from './pages/ErrorPages/ErrorPage';
- import ForgotPasswordPage from './pages/ForgotPasswordPage/ForgotPasswordPageMUI';
- import PrivateRoute from './components/Router/PrivateRoute';
- import MailSent from './pages/ForgotPasswordPage/ForgotPasswordMailSent/MailSent';
- import Register from './pages/RegisterPages/Register/Register';
- import RegisterSuccessful from './pages/RegisterPages/RegisterSuccessful.js/RegisterSuccessful';
- import ResetPasswordPage from './pages/ResetPasswordPage/ResetPasswordPage';
- import CreateOffer from './pages/CreateOffer/CreateOffer';
- import ItemDetailsPage from './pages/ItemDetailsPage/ItemDetailsPageMUI';
-
-
- const AppRoutes = () => {
- return (
- <Switch>
- <Route exact path={BASE_PAGE} component={LoginPage} />
- <Route exact path={LOGIN_PAGE} component={LoginPage} />
- <Route path={NOT_FOUND_PAGE} component={NotFoundPage} />
- <Route path={REGISTER_SUCCESSFUL_PAGE} component={RegisterSuccessful} />
- <Route path={REGISTER_PAGE} component={Register} />
- <Route path={ERROR_PAGE} component={ErrorPage} />
- <Route path={FORGOT_PASSWORD_MAIL_SENT} component={MailSent} />
- <Route path={FORGOT_PASSWORD_PAGE} component={ForgotPasswordPage} />
- <Route path={RESET_PASSWORD_PAGE} component={ResetPasswordPage}/>
- <Route path={CREATE_OFFER_PAGE} component={CreateOffer}/>
- <Route path={ITEM_DETAILS_PAGE} component={ItemDetailsPage} />
-
- <PrivateRoute
- exact
- path={HOME_PAGE}
- component={HomePage}
- />
- <Redirect from="*" to={NOT_FOUND_PAGE} />
- </Switch>
- )};
-
-
- export default AppRoutes;
|