config.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import * as routes from './../../../constants/routes';
  2. import { lazy } from 'react';
  3. const landingPage = lazy(() => import('./../../public-components/landingPage'));
  4. const homePage = lazy(() => import('./../../user-components/homePage'));
  5. const signInPage = lazy(() => import('./../../../containers/auth/SignInPage'));
  6. const signUpPage = lazy(() => import('./../../../containers/auth/SignUpPage'));
  7. const createTestForm = lazy(() => import('./../../user-components/admin-components/createTestForm'));
  8. const profilePage = lazy(() => import('./../../user-components/profilePage'));
  9. const categoriesPage = lazy(() => import('./../../user-components/categoriesPage'));
  10. export default [
  11. {
  12. path: routes.LANDING,
  13. access: 'public',
  14. component: landingPage
  15. },
  16. {
  17. path: routes.SIGN_IN,
  18. access: 'public',
  19. component: signInPage
  20. },
  21. {
  22. path: routes.SIGN_UP,
  23. access: 'public',
  24. component: signUpPage
  25. },
  26. {
  27. path: routes.HOME,
  28. access: 'user-only',
  29. component: homePage
  30. },
  31. {
  32. path: routes.CATEGORIES,
  33. access: 'user-only',
  34. component: categoriesPage
  35. },
  36. {
  37. path: routes.PROFILE,
  38. access: 'user-only',
  39. component: profilePage
  40. },
  41. {
  42. path: routes.CREATE_TEST,
  43. access: 'admin-only',
  44. component: createTestForm
  45. }
  46. ]