! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡·
! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡·
Explore posts from servers
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/18/2024 in #❓・help
NuxtLoadingIndicator doesn't work properly on nested page with lazy load
The loading indicator doesn't show on nested pages with lazy load for the page content. I tried to use to use start() before my lazy call but it doesn't work becausen nuxt stop finish() when the page is loaded
const loadingIndicator = useLoadingIndicator()
loadingIndicator.start()

const { data: resource, pending } = await useGetResourceGallery({
resource_id: parseInt(route.params.resource_id as string),
fetch_type: 'fetch',
})
const loadingIndicator = useLoadingIndicator()
loadingIndicator.start()

const { data: resource, pending } = await useGetResourceGallery({
resource_id: parseInt(route.params.resource_id as string),
fetch_type: 'fetch',
})
how Can I do ? I need a workarround
1 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
Can you tell me why my middleware is called 3 times ? https://stackblitz.com/edit/github-3enzca-ixdqzf I have the same issue on my middlewares were I have redirections... It's always called 3 times. If I put logic outside middleware in setup, only 2 times happening.
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 3/25/2024 in #❓・help
Nested routes but not for all pages
No description
2 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 3/11/2024 in #❓・help
[useFetch] Component is already mounted, please use $fetch instead (in middleware)
I get this warning with useFetch in a middleware.
export default defineNuxtRouteMiddleware(async () => {
const { user } = useAuth()

const { data } = await useFetch('/api/auth/user')
user.value = data.value
})
export default defineNuxtRouteMiddleware(async () => {
const { user } = useAuth()

const { data } = await useFetch('/api/auth/user')
user.value = data.value
})
The documentation states: useFetch is a composable meant to be called directly in a setup function, plugin, or route middleware. I tried with useAsyncData too, but same erro. Do I have to make two separate middleware ? One using useFetch on server, and another using $fetch on client side ?? Or can I just use usefetch when process.server and $fetch when process.client ?
10 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 3/1/2024 in #❓・help
Hydratation issue using pinia store (stackblitz reproduction)
I'm having an issue with SSR rendering using pinia store. Here the issue : https://stackblitz.com/edit/github-6xitgs?file=stores%2FuseTestStore.ts,app.vue,nuxt.config.ts,components%2FTest.vue How can I fix this issue ? My ssr is not rendering correctly. I need to have my testStore.test to true in ssr mode like on my client. How to ? (you have to refresh the renderer page)
4 replies