Reinitialized commit. Update and actors overview with some filters.
This commit is contained in:
18
renderer/usePageContext.js
Normal file
18
renderer/usePageContext.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// `usePageContext` allows us to access `pageContext` in any Vue component.
|
||||
// See https://vike.dev/pageContext-anywhere
|
||||
|
||||
import { inject } from 'vue'
|
||||
|
||||
export { usePageContext }
|
||||
export { setPageContext }
|
||||
|
||||
const key = Symbol()
|
||||
|
||||
function usePageContext() {
|
||||
const pageContext = inject(key)
|
||||
return pageContext
|
||||
}
|
||||
|
||||
function setPageContext(app, pageContext) {
|
||||
app.provide(key, pageContext)
|
||||
}
|
||||
Reference in New Issue
Block a user