This commit is contained in:
Annika
2022-07-31 12:33:10 -06:00
commit 3eaefbf02a
58 changed files with 7540 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import { authGuard } from '@bcwdev/auth0provider-client'
function loadPage(page) {
return () => import(`./pages/${page}.vue`)
}
const routes = [
{
path: '/',
name: 'Home',
component: loadPage('HomePage')
},
{
path: '/about',
name: 'About',
component: loadPage('AboutPage')
},
{
path: '/account',
name: 'Account',
component: loadPage('AccountPage'),
beforeEnter: authGuard
}
]
export const router = createRouter({
linkActiveClass: 'router-link-active',
linkExactActiveClass: 'router-link-exact-active',
history: createWebHashHistory(),
routes
})