added scroll to top per page middleware

This commit is contained in:
Mamalizz
2025-04-18 19:51:06 +03:30
parent 11f401ebde
commit 9b7d1e2ae3
+5
View File
@@ -0,0 +1,5 @@
export default defineNuxtRouteMiddleware((to, from) => {
if (to.path !== from.path && process.client) {
window.scrollTo(0, 0);
}
});