export default defineNuxtRouteMiddleware(async (to, from) => {
const authStore = useAuthStore() // authstore is a pinia store which saves auth data into cookies
if (authStore.userIsAuthenticated) {
return navigateTo(useNuxtApp().$localePath('/app))
}
})
export default defineNuxtRouteMiddleware(async (to, from) => {
const authStore = useAuthStore() // authstore is a pinia store which saves auth data into cookies
if (authStore.userIsAuthenticated) {
return navigateTo(useNuxtApp().$localePath('/app))
}
})