Skip to content

Commit

Permalink
chore: scroll top on navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutV committed May 24, 2024
1 parent 4e0f50f commit 3bec493
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ const routes: RouteRecordRaw[] = [
];

const router = createRouter({
async scrollBehavior() {
return await new Promise((resolve) => {
setTimeout(() => {
resolve({
top: 0,
behavior: 'smooth',
});
}, 350);
});
},
history: createWebHistory(),
linkActiveClass: 'active',
routes,
Expand Down

0 comments on commit 3bec493

Please sign in to comment.