You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AppRoutes.js 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. SCHEDULE_PAGE,
  20. STATS_PAGE
  21. } from "./constants/pages";
  22. // import LoginPage from './pages/LoginPage/LoginPage';
  23. import LoginPage from "./pages/LoginPage/LoginPageMUI";
  24. // import HomePage from './pages/HomePage/HomePage';
  25. import HomePage from "./pages/HomePage/HomePageMUI";
  26. import AdsPage from "./pages/AdsPage/AdsPage";
  27. import NotFoundPage from "./pages/ErrorPages/NotFoundPage";
  28. import ErrorPage from "./pages/ErrorPages/ErrorPage";
  29. // import ForgotPasswordPage from './pages/ForgotPasswordPage/ForgotPasswordPage';
  30. import ForgotPasswordPage from "./pages/ForgotPasswordPage/ForgotPasswordPageMUI";
  31. import PrivateRoute from "./components/Router/PrivateRoute";
  32. import ForgotPasswordConfirmationPage from "./pages/ForgotPasswordPage/ForgotPasswordConfirmationPageMUI";
  33. import ResetPasswordPage from "./pages/ForgotPasswordPage/ResetPasswordPageMUI";
  34. import UsersPage from "./pages/UsersPage/UsersPage";
  35. import CandidatesPage from './pages/CandidatesPage/CandidatesPage'
  36. import AdDetailsPage from "./pages/AdsPage/AdDetailsPage";
  37. import UserDetails from "./pages/UsersPage/UserDetails";
  38. import CandidateDetailsPage from "./pages/CandidatesPage/CandidateDetailsPage";
  39. import SelectionProcessPage from "./pages/SelectionProcessPage/SelectionProcessPage";
  40. import SelectionProcessOfApplicantPage from "./pages/SelectionProcessPage/SelectionProcessOfApplicantPage";
  41. import SchedulePage from "./pages/SchedulePage/SchedulePage";
  42. import StatsPage from "./pages/StatsPage/StatsPage";
  43. const AppRoutes = () => (
  44. <Switch>
  45. <Route exact path={BASE_PAGE} component={LoginPage} />
  46. <Route path={NOT_FOUND_PAGE} component={NotFoundPage} />
  47. {/* <Route path={USERS_PAGE} component={UsersPage} /> */}
  48. <Route path={ERROR_PAGE} component={ErrorPage} />
  49. <Route path={FORGOT_PASSWORD_PAGE} component={ForgotPasswordPage} />
  50. <Route
  51. path={FORGOT_PASSWORD_CONFIRMATION_PAGE}
  52. component={ForgotPasswordConfirmationPage}
  53. />
  54. <Route path={RESET_PASSWORD_PAGE} component={ResetPasswordPage} />
  55. <PrivateRoute exact path={HOME_PAGE} component={HomePage} />
  56. <PrivateRoute exact path={ADS_PAGE} component={AdsPage} />
  57. <PrivateRoute exact path={AD_DETAILS_PAGE} component={AdDetailsPage} />
  58. <PrivateRoute exact path={USER_DETAILS_PAGE} component={UserDetails} />
  59. <PrivateRoute exact path={USERS_PAGE} component={UsersPage} />
  60. <PrivateRoute exact path={CANDIDATES_PAGE} component={CandidatesPage} />
  61. <PrivateRoute exact path={CANDIDATES_DETAILS_PAGE} component={CandidateDetailsPage} />
  62. <PrivateRoute exact path={SELECTION_PROCESS_PAGE} component={SelectionProcessPage} />
  63. <PrivateRoute exact path={SELECTION_PROCESS_OF_APPLICANT_PAGE} component={SelectionProcessOfApplicantPage} />
  64. <PrivateRoute exact path={SCHEDULE_PAGE} component={SchedulePage} />
  65. <PrivateRoute exact path={STATS_PAGE} component={StatsPage} />
  66. <Redirect from="*" to={NOT_FOUND_PAGE} />
  67. </Switch>
  68. );
  69. export default AppRoutes;