chore: retrying without ClientOnly

This commit is contained in:
Michael Brevard 2024-04-09 22:01:37 +03:00 committed by GitHub
parent 669fcee81b
commit 9b94d100a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
import { defineComponent, h, onBeforeUnmount, onMounted, ref } from 'vue' import { defineComponent, h, onBeforeUnmount, onMounted, ref } from 'vue'
import type { Component, Ref } from 'vue' import type { Component, Ref } from 'vue'
import ClientOnly from '#app/components/client-only' // import ClientOnly from '#app/components/client-only'
import { useObserver } from '#app/utils' import { useObserver } from '#app/utils'
export const createLazyIOClientPage = (componentLoader: Component) => { export const createLazyIOClientPage = (componentLoader: Component) => {
@ -23,9 +23,7 @@ export const createLazyIOClientPage = (componentLoader: Component) => {
unobserve = null unobserve = null
}) })
return () => h('div', { ref: el }, [ return () => h('div', { ref: el }, [
h(ClientOnly, undefined, [ isIntersecting.value ? h(componentLoader, attrs) : null,
isIntersecting.value ? h(componentLoader, attrs) : null,
]),
]) ])
}, },
}) })