fix: scroll to top on route change

This commit is contained in:
Sebin Nyshkim 2022-01-06 09:07:49 +01:00
parent 841bfc9879
commit 3175992beb

View file

@ -42,6 +42,9 @@ const routes = [
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes,
scrollBehavior() {
return { top: 0 };
},
});
export default router;