Holy De Mello
Holy De Mello
NNuxt
Created by Holy De Mello on 9/1/2024 in #❓・help
Nuxt 3 Middleware issue
nvm i found the solution turns out i need to make sure its running in server side
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')
}
}
})
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')
}
}
})
4 replies
NNuxt
Created by Holy De Mello on 8/30/2024 in #❓・help
Trying to use Leaderline with Nuxt App
its working like a charm now, thank you
6 replies
NNuxt
Created by Holy De Mello on 8/30/2024 in #❓・help
Trying to use Leaderline with Nuxt App
LeaderLine.obj to access rest of the features
6 replies
NNuxt
Created by Holy De Mello on 8/30/2024 in #❓・help
Trying to use Leaderline with Nuxt App
so this plugin gives the Leaderline as a variable LeaderLine.setLine - to create line
6 replies
NNuxt
Created by Holy De Mello on 8/30/2024 in #❓・help
Trying to use Leaderline with Nuxt App
I figured it out, need to enclose component which uses the Leaderline inside <client-only>
6 replies