diff --git a/apps/frontend/src/router/index.ts b/apps/frontend/src/router/index.ts index cd39293..c7a55e1 100644 --- a/apps/frontend/src/router/index.ts +++ b/apps/frontend/src/router/index.ts @@ -93,6 +93,13 @@ const routes = [ const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes, + scrollBehavior(to, from, savedPosition) { + if (savedPosition) { + return savedPosition + } else { + return { top: 0, behavior: 'smooth' } + } + }, }) export default router