Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 12, 2024
1 parent 858734a commit 907cfe3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vike-vue-query/integration/onBeforeRenderClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { hydrate } from '@tanstack/vue-query'
import type { OnBeforeRenderClientSync } from 'vike-vue/types'

const onBeforeRenderClient: OnBeforeRenderClientSync = (pageContext): ReturnType<OnBeforeRenderClientSync> => {
hydrateVueQuery(pageContext)
}

type PageContext = Parameters<typeof onBeforeRenderClient>[0]
function hydrateVueQuery(pageContext: PageContext) {
if (!pageContext.isHydration) {
return
}
Expand Down

0 comments on commit 907cfe3

Please sign in to comment.