export default defineNuxtRouteMiddleware((to,from)=>{ if (process.server) { console.log('This is running on the server') const cookie = useCookie('__session') console.log(cookie.value) if(!cookie.value){ console.log("cookie.value is none") // return navigateTo('/admin/login') } }})