version update to nuxt4

This commit is contained in:
Julian Krauser 2025-07-23 13:46:18 +02:00
parent 7f1770d442
commit ef84942e38
41 changed files with 5134 additions and 4946 deletions

15
app/plugins/global.ts Normal file
View file

@ -0,0 +1,15 @@
import type Global from "~~/types/single/global";
export default defineNuxtPlugin(async (nuxtApp) => {
const globalState = useState<Global | null>("global", () => null);
if (!globalState.value) {
const { findOne } = useStrapi();
const { data: global } = await useAsyncData("global", () => findOne<Global>("global"), {
server: true,
lazy: false,
default: () => {},
});
globalState.value = global.value?.data ?? null;
}
});