This repository has been archived on 2021-07-29. You can view files and clone it, but cannot push or open issues or pull requests.
find_coach/src/router/index.js

30 lines
1019 B
JavaScript
Raw Normal View History

2021-06-27 14:22:20 +02:00
import { createRouter, createWebHistory } from 'vue-router';
2021-05-07 17:07:46 +02:00
2021-07-28 21:59:27 +02:00
import UserAuth from '../pages/auth/UserAuth';
2021-06-27 14:31:46 +02:00
import CoachDetails from '../pages/coaches/CoachDetails';
import CoachesList from '../pages/coaches/CoachesList';
import CoachRegistration from '../pages/coaches/CoachRegistration';
import ContactCoach from '../pages/requests/ContactCoach';
import RequestsRecieved from '../pages/requests/RequestsRecieved';
import NotFound from '../pages/NotFound';
2021-05-07 17:07:46 +02:00
const router = createRouter({
2021-06-27 14:22:20 +02:00
history: createWebHistory(),
routes: [
{ path: '/', redirect: '/coaches' },
{ path: '/coaches', component: CoachesList },
2021-06-27 14:22:20 +02:00
{
path: '/coaches/:id',
2021-06-27 17:31:08 +02:00
component: CoachDetails,
props: true,
2021-06-27 14:31:46 +02:00
children: [{ path: 'contact', component: ContactCoach }]
2021-06-27 14:22:20 +02:00
},
{ path: '/register', component: CoachRegistration },
{ path: '/requests', component: RequestsRecieved },
2021-07-28 21:59:27 +02:00
{ path: '/auth', component: UserAuth },
2021-07-28 21:18:27 +02:00
{ path: '/:notFound(.*)', component: NotFound }
2021-06-27 14:22:20 +02:00
]
2021-05-07 17:07:46 +02:00
});
2021-06-27 14:22:20 +02:00
export default router;