import { cache } from "react"; import { getCMS } from "@/lib/payload/getPayload"; import type { About, AktuellesIntro, AngeboteIntro, Booking, Contact, Home } from "@/payload-types"; export const getHomeGlobal = cache(async (): Promise => { const payload = await getCMS(); return payload.findGlobal({ slug: "home" }); }); export const getAboutGlobal = cache(async (): Promise => { const payload = await getCMS(); return payload.findGlobal({ slug: "about" }); }); export const getAngeboteIntroGlobal = cache(async (): Promise => { const payload = await getCMS(); return payload.findGlobal({ slug: "angebote-intro" }); }); export const getAktuellesIntroGlobal = cache(async (): Promise => { const payload = await getCMS(); return payload.findGlobal({ slug: "aktuelles-intro" }); }); export const getContactGlobal = cache(async (): Promise => { const payload = await getCMS(); return payload.findGlobal({ slug: "contact" }); }); export const getBookingGlobal = cache(async (): Promise => { const payload = await getCMS(); return payload.findGlobal({ slug: "booking" }); });