debug fetching global data error page on ssg

This commit is contained in:
Valentin
2024-04-12 16:14:02 +02:00
parent 05bb7b3cd5
commit d9333f2189
9 changed files with 58 additions and 50 deletions

View File

@@ -0,0 +1,11 @@
export const useFetchGlobalData = async () => {
const globalData = useState('globalData', () => {})
await callOnce(async () => {
globalData.value = await $fetch(`/api/items/global`)
globalData.value = globalData.value.data
})
return {
globalData
}
}