elk/middleware/link.global.ts

7 lines
191 B
TypeScript
Raw Normal View History

const reloadRoutes = new Set(['/invite'])
export default defineNuxtRouteMiddleware((to) => {
if (process.client && reloadRoutes.has(to.fullPath))
window.location.pathname = to.path
})