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' },
|
2021-06-27 16:54:35 +02:00
|
|
|
{ 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,
|
2021-06-28 18:23:54 +02:00
|
|
|
props: true,
|
2021-06-27 14:31:46 +02:00
|
|
|
children: [{ path: 'contact', component: ContactCoach }]
|
2021-06-27 14:22:20 +02:00
|
|
|
},
|
2021-06-27 16:54:35 +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;
|