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

28 lines
928 B
JavaScript

import { createRouter, createWebHistory } from 'vue-router';
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';
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/', redirect: '/coaches' },
{ path: '/coaches', component: CoachesList },
{
path: '/coaches/:id',
component: CoachDetails,
props: true,
children: [{ path: 'contact', component: ContactCoach }]
},
{ path: '/register', component: CoachRegistration },
{ path: '/requests', component: RequestsRecieved },
{ path: '/:notFound(.*)', component: NotFound }
]
});
export default router;