Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. PATTERNS_PAGE,
  20. PATTERN_DETAILS_PAGE,
  21. SCHEDULE_PAGE,
  22. STATS_PAGE,
  23. REGISTER_PAGE
  24. } from "./constants/pages";
  25. // import LoginPage from './pages/LoginPage/LoginPage';
  26. import LoginPage from "./pages/LoginPage/LoginPageMUI";
  27. // import HomePage from './pages/HomePage/HomePage';
  28. import HomePage from "./pages/HomePage/HomePageMUI";
  29. import AdsPage from "./pages/AdsPage/AdsPage";
  30. import NotFoundPage from "./pages/ErrorPages/NotFoundPage";
  31. import ErrorPage from "./pages/ErrorPages/ErrorPage";
  32. // import ForgotPasswordPage from './pages/ForgotPasswordPage/ForgotPasswordPage';
  33. import ForgotPasswordPage from "./pages/ForgotPasswordPage/ForgotPasswordPageMUI";
  34. import PrivateRoute from "./components/Router/PrivateRoute";
  35. import ForgotPasswordConfirmationPage from "./pages/ForgotPasswordPage/ForgotPasswordConfirmationPageMUI";
  36. import ResetPasswordPage from "./pages/ForgotPasswordPage/ResetPasswordPageMUI";
  37. import UsersPage from "./pages/UsersPage/UsersPage";
  38. import CandidatesPage from "./pages/CandidatesPage/CandidatesPage";
  39. import AdDetailsPage from "./pages/AdsPage/AdDetailsPage";
  40. import UserDetails from "./pages/UsersPage/UserDetails";
  41. import CandidateDetailsPage from "./pages/CandidatesPage/CandidateDetailsPage";
  42. import SelectionProcessPage from "./pages/SelectionProcessPage/SelectionProcessPage";
  43. import SelectionProcessOfApplicantPage from "./pages/SelectionProcessPage/SelectionProcessOfApplicantPage";
  44. import PatternsPage from "./pages/PatternsPage/PatternsPage";
  45. import PatternDetailsPage from "./pages/PatternsPage/PatternDetailsPage";
  46. import SchedulePage from "./pages/SchedulePage/SchedulePage";
  47. import StatsPage from "./pages/StatsPage/StatsPage";
  48. import RegisterPage from "./pages/RegisterPage/RegisterPage";
  49. const AppRoutes = () => (
  50. <Switch>
  51. <Route exact path={BASE_PAGE} component={LoginPage} />
  52. <Route path={NOT_FOUND_PAGE} component={NotFoundPage} />
  53. {/* <Route path={USERS_PAGE} component={UsersPage} /> */}
  54. <Route path={ERROR_PAGE} component={ErrorPage} />
  55. <Route path={FORGOT_PASSWORD_PAGE} component={ForgotPasswordPage} />
  56. <Route
  57. path={FORGOT_PASSWORD_CONFIRMATION_PAGE}
  58. component={ForgotPasswordConfirmationPage}
  59. />
  60. <Route exact path={REGISTER_PAGE} component={RegisterPage} />
  61. <Route path={RESET_PASSWORD_PAGE} component={ResetPasswordPage} />
  62. <PrivateRoute exact path={HOME_PAGE} component={HomePage} />
  63. <PrivateRoute exact path={ADS_PAGE} component={AdsPage} />
  64. <PrivateRoute exact path={AD_DETAILS_PAGE} component={AdDetailsPage} />
  65. <PrivateRoute exact path={USER_DETAILS_PAGE} component={UserDetails} />
  66. <PrivateRoute exact path={USERS_PAGE} component={UsersPage} />
  67. <PrivateRoute exact path={CANDIDATES_PAGE} component={CandidatesPage} />
  68. <PrivateRoute
  69. exact
  70. path={CANDIDATES_DETAILS_PAGE}
  71. component={CandidateDetailsPage}
  72. />
  73. <PrivateRoute
  74. exact
  75. path={SELECTION_PROCESS_PAGE}
  76. component={SelectionProcessPage}
  77. />
  78. <PrivateRoute
  79. exact
  80. path={SELECTION_PROCESS_OF_APPLICANT_PAGE}
  81. component={SelectionProcessOfApplicantPage}
  82. />
  83. <PrivateRoute
  84. exact
  85. path={PATTERN_DETAILS_PAGE}
  86. component={PatternDetailsPage}
  87. />
  88. <PrivateRoute exact path={PATTERNS_PAGE} component={PatternsPage} />
  89. <PrivateRoute exact path={SCHEDULE_PAGE} component={SchedulePage} />
  90. <PrivateRoute exact path={STATS_PAGE} component={StatsPage} />
  91. <Redirect from="*" to={NOT_FOUND_PAGE} />
  92. </Switch>
  93. );
  94. export default AppRoutes;