no 404 on refresh

This commit is contained in:
Will Freeman
2024-10-03 19:22:17 -05:00
parent 7424cb83bb
commit e32edaf439
21 changed files with 223 additions and 62 deletions
+19
View File
@@ -3,6 +3,15 @@ import HomeView from '../views/HomeView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
scrollBehavior(to, from, savedPosition) {
if (to.hash) {
return {
el: to.hash,
behavior: 'smooth',
}
}
return { top: 0 }
},
routes: [
{
path: '/',
@@ -27,6 +36,16 @@ const router = createRouter({
name: 'report',
component: () => import('../views/ReportView.vue')
},
{
path: '/contact',
name: 'contact',
component: () => import('../views/ContactView.vue')
},
{
path: '/roadmap',
name: 'roadmap',
component: () => import('../views/RoadmapView.vue')
}
]
})