Skip to content

Commit

Permalink
minor refactor: rename hydratePinia => onBeforeRenderClient
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 12, 2024
1 parent 1a9728a commit 1fa8122
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/vike-vue-pinia/integration/+config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
},
onCreateApp: 'import:vike-vue-pinia/__internal/integration/onCreateApp:onCreateApp',
onAfterRenderHtml: 'import:vike-vue-pinia/__internal/integration/onAfterRenderHtml:onAfterRenderHtml',
onBeforeRenderClient: 'import:vike-vue-pinia/__internal/integration/hydratePinia:hydratePinia',
onBeforeRenderClient: 'import:vike-vue-pinia/__internal/integration/onBeforeRenderClient:onBeforeRenderClient',
} satisfies Config

declare global {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { OnBeforeRenderClientSync } from 'vike-vue/types'

export { hydratePinia }
export { onBeforeRenderClient }

const hydratePinia: OnBeforeRenderClientSync = (pageContext): ReturnType<OnBeforeRenderClientSync> => {
const onBeforeRenderClient: OnBeforeRenderClientSync = (pageContext): ReturnType<OnBeforeRenderClientSync> => {
const { pinia, fromHtmlRenderer, isHydration } = pageContext

if (!isHydration) {
Expand Down
6 changes: 3 additions & 3 deletions packages/vike-vue-pinia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"./config": "./dist/+config.js",
"./__internal/integration/onCreateApp": "./dist/onCreateApp.js",
"./__internal/integration/onAfterRenderHtml": "./dist/onAfterRenderHtml.js",
"./__internal/integration/hydratePinia": "./dist/hydratePinia.js"
"./__internal/integration/onBeforeRenderClient": "./dist/onBeforeRenderClient.js"
},
"typesVersions": {
"*": {
Expand All @@ -30,8 +30,8 @@
"__internal/integration/onAfterRenderHtml": [
"./dist/onAfterRenderHtml.d.ts"
],
"__internal/integration/hydratePinia": [
"./dist/hydratePinia.d.ts"
"__internal/integration/onBeforeRenderClient": [
"./dist/onBeforeRenderClient.d.ts"
]
}
},
Expand Down

0 comments on commit 1fa8122

Please sign in to comment.