Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. import home from '../views/home.vue'
  3. import Profile from '../views/Profile.vue'
  4. import Matches from '../views/Matches.vue'
  5. import Chats from '../views/Chats.vue'
  6. import Login from '../views/Login.vue'
  7. import Register from '../views/Register.vue'
  8. import Survey from '../views/Survey.vue'
  9. const routes = [
  10. {
  11. path: '/',
  12. component: home,
  13. name: 'HomeView',
  14. meta: { requiresAuth: true, requiresProfile: true },
  15. },
  16. {
  17. path: '/profile',
  18. component: Profile,
  19. name: 'Profile',
  20. meta: { requiresAuth: true },
  21. },
  22. {
  23. path: '/matches',
  24. component: Matches,
  25. name: 'matches',
  26. meta: { requiresAuth: true, requiresProfile: true },
  27. },
  28. {
  29. path: '/chats/:uid',
  30. component: Chats,
  31. name: `chat`,
  32. props: true,
  33. meta: { requiresAuth: true, requiresProfile: true },
  34. },
  35. {
  36. path: `/login`,
  37. component: Login,
  38. name: `login`,
  39. },
  40. {
  41. path: `/survey`,
  42. component: Survey,
  43. name: `survey`,
  44. },
  45. {
  46. path: `/register`,
  47. component: Register,
  48. name: `register`,
  49. },
  50. ]
  51. const router = createRouter({
  52. history: createWebHistory(),
  53. routes,
  54. })
  55. export default router