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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. import HomeView from '../views/HomeView.vue'
  3. import ProfileView from '../views/ProfileView.vue'
  4. import ChatView from '../views/ChatView.vue'
  5. import MatchesView from '../views/MatchesView.vue'
  6. import LoginView from '../views/LoginView.vue'
  7. import SurveyView from '../views/SurveyView.vue'
  8. import OnboardingView from '../views/OnboardingView.vue'
  9. const routes = [
  10. {
  11. path: '/',
  12. component: HomeView,
  13. name: 'HomeView',
  14. meta: { requiresAuth: true, requiresCompleteProfile: true },
  15. },
  16. {
  17. path: '/profile/:pid',
  18. component: ProfileView,
  19. name: 'ProfileView',
  20. meta: { requiresAuth: true, requiresCompleteProfile: true },
  21. },
  22. {
  23. path: '/matches',
  24. component: MatchesView,
  25. name: 'MatchesView',
  26. meta: { requiresAuth: true, requiresCompleteProfile: true },
  27. },
  28. {
  29. path: '/matches/:pid',
  30. component: ProfileView,
  31. meta: { requiresAuth: true, requiresCompleteProfile: true },
  32. },
  33. {
  34. path: '/chat/:tid',
  35. component: ChatView,
  36. meta: {
  37. requiresAuth: true,
  38. requiresCompleteProfile: true,
  39. props: true,
  40. },
  41. },
  42. {
  43. path: `/survey`,
  44. component: SurveyView,
  45. name: `SurveyView`,
  46. meta: { requiresAuth: true, requiresCompleteProfile: false },
  47. },
  48. {
  49. path: `/onboarding`,
  50. component: OnboardingView,
  51. name: `OnboardingView`,
  52. meta: { requiresAuth: true, requiresCompleteProfile: false },
  53. },
  54. {
  55. path: `/login`,
  56. component: LoginView,
  57. name: `LoginView`,
  58. meta: { requiresAuth: false, requiresCompleteProfile: false },
  59. },
  60. ]
  61. const router = createRouter({
  62. history: createWebHistory(),
  63. routes,
  64. })
  65. export { router }