Skip to content

Commit

Permalink
fix minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 12, 2024
1 parent abf6405 commit 756e99a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vike-vue-query/integration/onAfterRenderHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { dehydrate } from '@tanstack/vue-query'
import type { OnAfterRenderHtmlSync } from 'vike-vue/types'

const onAfterRenderHtml: OnAfterRenderHtmlSync = (pageContext): ReturnType<OnAfterRenderHtmlSync> => {
deonBeforeRenderClient(pageContext)
dehydrateVueQuery(pageContext)
}

type PageContext = Parameters<typeof onAfterRenderHtml>[0]
function deonBeforeRenderClient(pageContext: PageContext) {
function dehydrateVueQuery(pageContext: PageContext) {
pageContext._vueQueryInitialState = dehydrate(pageContext.queryClient!)
}

0 comments on commit 756e99a

Please sign in to comment.