mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-22 01:15:25 +03:00
14 lines
299 B
TypeScript
14 lines
299 B
TypeScript
export const isHydrated = computed(() => {
|
|
if (process.server)
|
|
return false
|
|
|
|
const nuxtApp = useNuxtApp()
|
|
if (!nuxtApp.isHydrating)
|
|
return false
|
|
|
|
const hydrated = ref(false)
|
|
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => {
|
|
hydrated.value = true
|
|
})
|
|
return hydrated
|
|
})
|