kopia lustrzana https://github.com/elk-zone/elk
refactor: set hydrated value in nuxt plugin
rodzic
b48a893614
commit
0187763c29
|
@ -1,8 +1 @@
|
|||
export const isHydrated = ref(false)
|
||||
|
||||
if (!process.server) {
|
||||
const nuxtApp = useNuxtApp()
|
||||
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => {
|
||||
isHydrated.value = true
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => {
|
||||
isHydrated.value = true
|
||||
})
|
||||
})
|
Ładowanie…
Reference in New Issue