import type { Metadata } from "next"; import { Cormorant_Garamond, Inter } from "next/font/google"; import { Navbar } from "@/components/Navbar"; import { Footer } from "@/components/Footer"; import { siteConfig } from "@/lib/site"; import { getOffers } from "@/lib/payload/content"; import { getCurrentCustomer } from "@/lib/auth/customer"; import { getBookingSettingsGlobal, getContactGlobal, getSEOSettingsGlobal } from "@/lib/payload/globals"; import { getSiteUrl } from "@/lib/seo/config"; import { JsonLd, organizationOrLocalBusinessJsonLd, websiteJsonLd } from "@/lib/seo/jsonld"; import "./globals.css"; // Every page under this layout can read live content from Payload, so the // whole subtree is rendered dynamically rather than statically at build time. export const dynamic = "force-dynamic"; const cormorant = Cormorant_Garamond({ variable: "--font-cormorant", subsets: ["latin"], weight: ["400", "500", "600"], style: ["normal", "italic"], }); const inter = Inter({ variable: "--font-inter", subsets: ["latin"], }); export const metadata: Metadata = { metadataBase: new URL(siteConfig.domain), title: { default: siteConfig.title, template: `%s — ${siteConfig.name}`, }, description: siteConfig.description, openGraph: { type: "website", locale: siteConfig.locale, url: siteConfig.domain, siteName: siteConfig.name, title: siteConfig.title, description: siteConfig.description, }, twitter: { card: "summary_large_image", title: siteConfig.title, description: siteConfig.description, }, // Configurable via env only — never a hardcoded verification ID (see .env.example). ...(process.env.GOOGLE_SITE_VERIFICATION ? { verification: { google: process.env.GOOGLE_SITE_VERIFICATION } } : {}), }; export default async function RootLayout({ children }: LayoutProps<"/">) { const [offers, customer, seoSettings, bookingSettings, contact, siteUrl] = await Promise.all([ getOffers(), getCurrentCustomer(), getSEOSettingsGlobal(), getBookingSettingsGlobal(), getContactGlobal(), getSiteUrl(), ]); return (