| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import { createRouter, createWebHistory } from 'vue-router'
- import home from '../views/home.vue'
- import Profile from '../views/Profile.vue'
- import Matches from '../views/Matches.vue'
- import Chats from '../views/Chats.vue'
- import Login from '../views/Login.vue'
- import Register from '../views/Register.vue'
- import Survey from '../views/Survey.vue'
-
- const routes = [
- {
- path: '/',
- component: home,
- name: 'HomeView',
- meta: { requiresAuth: true, requiresProfile: true },
- },
- {
- path: '/profile',
- component: Profile,
- name: 'Profile',
- meta: { requiresAuth: true },
- },
- {
- path: '/matches',
- component: Matches,
- name: 'matches',
- meta: { requiresAuth: true, requiresProfile: true },
- },
- {
- path: '/chats/:uid',
- component: Chats,
- name: `chat`,
- props: true,
- meta: { requiresAuth: true, requiresProfile: true },
- },
- {
- path: `/login`,
- component: Login,
- name: `login`,
- },
- {
- path: `/survey`,
- component: Survey,
- name: `survey`,
- },
- {
- path: `/register`,
- component: Register,
- name: `register`,
- },
- ]
-
- const router = createRouter({
- history: createWebHistory(),
- routes,
- })
-
- export default router
|