2022-07-31 12:33:10 -06:00
|
|
|
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')
|
|
|
|
|
},
|
2022-08-03 12:03:15 -06:00
|
|
|
{
|
2022-08-03 16:31:59 -06:00
|
|
|
path: '/profile/:id',
|
2022-08-03 12:03:15 -06:00
|
|
|
name: 'Profile',
|
|
|
|
|
component: loadPage('ProfilePage')
|
2022-08-03 16:31:59 -06:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/vault/:id',
|
|
|
|
|
name: 'Vault',
|
|
|
|
|
component: loadPage('VaultPage')
|
2022-07-31 12:33:10 -06:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export const router = createRouter({
|
|
|
|
|
linkActiveClass: 'router-link-active',
|
|
|
|
|
linkExactActiveClass: 'router-link-exact-active',
|
|
|
|
|
history: createWebHashHistory(),
|
|
|
|
|
routes
|
|
|
|
|
})
|