| 1 | import { createRouter, createWebHistory } from 'vue-router'
|
|---|
| 2 | import ListingsView from '../views/ListingsView.vue'
|
|---|
| 3 | import ListingDetailsView from '../views/ListingDetailsView.vue'
|
|---|
| 4 | import LoginView from '../views/LoginView.vue'
|
|---|
| 5 | import SignupView from '../views/SignupView.vue'
|
|---|
| 6 | import ProfileView from '../views/ProfileView.vue'
|
|---|
| 7 | import OwnerProfileView from '../views/OwnerProfileView.vue'
|
|---|
| 8 | import AdminModerationView from '@/views/AdminModerationView.vue'
|
|---|
| 9 | import AdminClientsView from '@/views/AdminClientsView.vue'
|
|---|
| 10 | import AdminListingsView from '@/views/AdminListingsView.vue'
|
|---|
| 11 | import ClinicDashboardView from '@/views/ClinicDashboardView.vue'
|
|---|
| 12 |
|
|---|
| 13 | const router = createRouter({
|
|---|
| 14 | history: createWebHistory(import.meta.env.BASE_URL),
|
|---|
| 15 | routes: [
|
|---|
| 16 | {
|
|---|
| 17 | path: '/',
|
|---|
| 18 | name: 'listings',
|
|---|
| 19 | component: ListingsView,
|
|---|
| 20 | },
|
|---|
| 21 | {
|
|---|
| 22 | path: '/login',
|
|---|
| 23 | name: 'login',
|
|---|
| 24 | component: LoginView,
|
|---|
| 25 | },
|
|---|
| 26 | {
|
|---|
| 27 | path: '/signup',
|
|---|
| 28 | name: 'signup',
|
|---|
| 29 | component: SignupView,
|
|---|
| 30 | },
|
|---|
| 31 | {
|
|---|
| 32 | path: '/profile',
|
|---|
| 33 | name: 'profile',
|
|---|
| 34 | component: ProfileView,
|
|---|
| 35 | },
|
|---|
| 36 | {
|
|---|
| 37 | path: '/clinics',
|
|---|
| 38 | name: 'clinic-dashboard',
|
|---|
| 39 | component: ClinicDashboardView,
|
|---|
| 40 | },
|
|---|
| 41 | {
|
|---|
| 42 | path: '/profile/:userId',
|
|---|
| 43 | name: 'user-profile',
|
|---|
| 44 | component: ProfileView,
|
|---|
| 45 | },
|
|---|
| 46 | {
|
|---|
| 47 | path: '/owner/:ownerId',
|
|---|
| 48 | name: 'owner-profile',
|
|---|
| 49 | component: OwnerProfileView,
|
|---|
| 50 | },
|
|---|
| 51 | {
|
|---|
| 52 | path: '/listing/:id',
|
|---|
| 53 | name: 'listing-details',
|
|---|
| 54 | component: ListingDetailsView,
|
|---|
| 55 | },
|
|---|
| 56 | {
|
|---|
| 57 | path: '/admin/clinics',
|
|---|
| 58 | name: 'admin-clinics',
|
|---|
| 59 | component: AdminModerationView,
|
|---|
| 60 | },
|
|---|
| 61 | {
|
|---|
| 62 | path: '/admin/clients',
|
|---|
| 63 | name: 'admin-clients',
|
|---|
| 64 | component: AdminClientsView,
|
|---|
| 65 | },
|
|---|
| 66 | {
|
|---|
| 67 | path: '/admin/listings',
|
|---|
| 68 | name: 'admin-listings',
|
|---|
| 69 | component: AdminListingsView,
|
|---|
| 70 | },
|
|---|
| 71 | ],
|
|---|
| 72 | })
|
|---|
| 73 |
|
|---|
| 74 | export default router
|
|---|