20 lines
400 B
TypeScript
20 lines
400 B
TypeScript
import type { PageDataValue } from '#layers/types/api/pageData'
|
|
|
|
export const usePageDataStore = defineStore('pageData', () => {
|
|
const pageData = ref<PageDataValue | null>(null)
|
|
|
|
const setPageData = (response: PageDataValue) => {
|
|
pageData.value = response
|
|
}
|
|
|
|
const clearPageData = () => {
|
|
pageData.value = null
|
|
}
|
|
|
|
return {
|
|
pageData,
|
|
setPageData,
|
|
clearPageData,
|
|
}
|
|
})
|