updated frontend from typescript to javascript

This commit is contained in:
cnachtigall1991
2021-10-05 00:16:20 +02:00
parent 27edfd0cfe
commit 886f182ff2
41 changed files with 1183 additions and 28 deletions

View File

@@ -1,12 +1,43 @@
import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
function lazyLoad(view) {
return () => import(`@/views/${view}.vue`)
}
const routes = [
{
path: '/',
name: 'Home',
component: Home
component: lazyLoad('Home')
},
{
path: '/player/:id',
name: 'Player',
component: lazyLoad('Player'),
props: true
},
{
path: '/player/:id/matches',
name: 'MyMatches',
component: lazyLoad('MyMatches'),
props: true
},
{
path: '/match/:match_id',
name: 'Match',
component: lazyLoad('Match'),
props: true
},
{
path: '/explore',
name: 'Explore',
component: lazyLoad('Explore'),
props: true
},
{
path: '/:pathMatch(.*)*',
redirect: '/'
}
]
const router = createRouter({