Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

AppRoutes.js 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import React from "react";
  2. import { Redirect, Route, Switch } from "react-router-dom";
  3. import {
  4. HOME_PAGE,
  5. ADS_PAGE,
  6. AD_DETAILS_PAGE,
  7. FORGOT_PASSWORD_PAGE,
  8. FORGOT_PASSWORD_CONFIRMATION_PAGE,
  9. NOT_FOUND_PAGE,
  10. ERROR_PAGE,
  11. BASE_PAGE,
  12. RESET_PASSWORD_PAGE,
  13. USERS_PAGE,
  14. CANDIDATES_PAGE,
  15. USER_DETAILS_PAGE,
  16. CANDIDATES_DETAILS_PAGE,
  17. SELECTION_PROCESS_PAGE,
  18. SELECTION_PROCESS_OF_APPLICANT_PAGE
  19. } from "./constants/pages";
  20. // import LoginPage from './pages/LoginPage/LoginPage';
  21. import LoginPage from "./pages/LoginPage/LoginPageMUI";
  22. // import HomePage from './pages/HomePage/HomePage';
  23. import HomePage from "./pages/HomePage/HomePageMUI";
  24. import AdsPage from "./pages/AdsPage/AdsPage";
  25. import NotFoundPage from "./pages/ErrorPages/NotFoundPage";
  26. import ErrorPage from "./pages/ErrorPages/ErrorPage";
  27. // import ForgotPasswordPage from './pages/ForgotPasswordPage/ForgotPasswordPage';
  28. import ForgotPasswordPage from "./pages/ForgotPasswordPage/ForgotPasswordPageMUI";
  29. import PrivateRoute from "./components/Router/PrivateRoute";
  30. import ForgotPasswordConfirmationPage from "./pages/ForgotPasswordPage/ForgotPasswordConfirmationPageMUI";
  31. import ResetPasswordPage from "./pages/ForgotPasswordPage/ResetPasswordPageMUI";
  32. import UsersPage from "./pages/UsersPage/UsersPage";
  33. import CandidatesPage from './pages/CandidatesPage/CandidatesPage'
  34. import AdDetailsPage from "./pages/AdsPage/AdDetailsPage";
  35. import UserDetails from "./pages/UsersPage/UserDetails";
  36. import CandidateDetailsPage from "./pages/CandidatesPage/CandidateDetailsPage";
  37. import SelectionProcessPage from "./pages/SelectionProcessPage/SelectionProcessPage";
  38. import SelectionProcessOfApplicantPage from "./pages/SelectionProcessPage/SelectionProcessOfApplicantPage";
  39. const AppRoutes = () => (
  40. <Switch>
  41. <Route exact path={BASE_PAGE} component={LoginPage} />
  42. <Route path={NOT_FOUND_PAGE} component={NotFoundPage} />
  43. {/* <Route path={USERS_PAGE} component={UsersPage} /> */}
  44. <Route path={ERROR_PAGE} component={ErrorPage} />
  45. <Route path={FORGOT_PASSWORD_PAGE} component={ForgotPasswordPage} />
  46. <Route
  47. path={FORGOT_PASSWORD_CONFIRMATION_PAGE}
  48. component={ForgotPasswordConfirmationPage}
  49. />
  50. <Route path={RESET_PASSWORD_PAGE} component={ResetPasswordPage} />
  51. <PrivateRoute exact path={HOME_PAGE} component={HomePage} />
  52. <PrivateRoute exact path={ADS_PAGE} component={AdsPage} />
  53. <PrivateRoute exact path={AD_DETAILS_PAGE} component={AdDetailsPage} />
  54. <PrivateRoute exact path={USER_DETAILS_PAGE} component={UserDetails} />
  55. <PrivateRoute exact path={USERS_PAGE} component={UsersPage} />
  56. <PrivateRoute exact path={CANDIDATES_PAGE} component={CandidatesPage} />
  57. <PrivateRoute exact path={CANDIDATES_DETAILS_PAGE} component={CandidateDetailsPage} />
  58. <PrivateRoute exact path={SELECTION_PROCESS_PAGE} component={SelectionProcessPage} />
  59. <PrivateRoute exact path={SELECTION_PROCESS_OF_APPLICANT_PAGE} component={SelectionProcessOfApplicantPage} />
  60. <Redirect from="*" to={NOT_FOUND_PAGE} />
  61. </Switch>
  62. );
  63. export default AppRoutes;