-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
56 lines (51 loc) · 1.12 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import ClasificationView from '../views/ClasificationView.vue'
import CalendarView from '../views/CalendarView.vue'
import FormularioView from '../views/FormularioView.vue'
import ErrorView from '../views/ErrorView.vue'
const routes = [
{
path: '/',
name: 'inicio',
component: HomeView
},
{
path: '/calendario',
name: 'calendario',
component: CalendarView
},
{
path: '/clasificaciones',
redirect: '/clasificaciones/2023',
children: [
{
path: '/clasificaciones/:year',
name: 'clasificaciones',
component: ClasificationView,
props: true
},
]
},
{
path: '/notificacion',
name: 'notificacion',
component: FormularioView
},
{
path: '/:pathMatch(.*)*',
redirect: '/404',
name: 'Redirect Error 404',
component: ErrorView
},
{
path: '/404',
name: 'Error 404',
component: ErrorView
},
]
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes
})
export default router