- Next.js 16 App Router site with the ANOUMA design system - Payload CMS (PostgreSQL) for offers, events, posts and page content - WebRTC video-call system with custom signaling server - SMTP email reminders and booking-request notifications - Customer accounts, calendar-based availability, and booking workflow
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
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<Home> => {
|
|
const payload = await getCMS();
|
|
return payload.findGlobal({ slug: "home" });
|
|
});
|
|
|
|
export const getAboutGlobal = cache(async (): Promise<About> => {
|
|
const payload = await getCMS();
|
|
return payload.findGlobal({ slug: "about" });
|
|
});
|
|
|
|
export const getAngeboteIntroGlobal = cache(async (): Promise<AngeboteIntro> => {
|
|
const payload = await getCMS();
|
|
return payload.findGlobal({ slug: "angebote-intro" });
|
|
});
|
|
|
|
export const getAktuellesIntroGlobal = cache(async (): Promise<AktuellesIntro> => {
|
|
const payload = await getCMS();
|
|
return payload.findGlobal({ slug: "aktuelles-intro" });
|
|
});
|
|
|
|
export const getContactGlobal = cache(async (): Promise<Contact> => {
|
|
const payload = await getCMS();
|
|
return payload.findGlobal({ slug: "contact" });
|
|
});
|
|
|
|
export const getBookingGlobal = cache(async (): Promise<Booking> => {
|
|
const payload = await getCMS();
|
|
return payload.findGlobal({ slug: "booking" });
|
|
});
|