mirror of
https://github.com/complexcaresolutions/frontend.zweitmeinu.ng.git
synced 2026-03-17 16:13:48 +00:00
- Phone number: 10 locations now use CMS site-settings contact.phone - ContactForm: service dropdown options from CMS services - FAQ categories: display names derived from CMS services - Footer: Top Fachbereiche column dynamic from CMS services - SEO metadata: fachbereiche, faq, kontakt use generateMetadata() - HomeCTA: converted to async server component, fetches settings - Added phoneToHref() helper to payload-helpers.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71 lines
2.2 KiB
TypeScript
71 lines
2.2 KiB
TypeScript
import type { Metadata } from "next"
|
||
import { TopBar, Header, Footer, EmergencyBanner } from "@/components/layout"
|
||
import { getNavigation, getSiteSettings, getSocialLinks, getServices } from "@/lib/api"
|
||
import { phoneToHref } from "@/lib/payload-helpers"
|
||
import "./globals.css"
|
||
|
||
export const metadata: Metadata = {
|
||
title: {
|
||
default: "zweitmeinu.ng – Medizinische Zweitmeinung",
|
||
template: "%s | zweitmeinu.ng",
|
||
},
|
||
description:
|
||
"Ihr zentrales Portal für qualifizierte medizinische Zweitmeinungen. Zugang zu erfahrenen Fachärzt:innen aus über 50 Fachbereichen.",
|
||
metadataBase: new URL(
|
||
process.env.NEXT_PUBLIC_SITE_URL || "https://zweitmeinu.ng",
|
||
),
|
||
openGraph: {
|
||
type: "website",
|
||
locale: "de_DE",
|
||
siteName: "zweitmeinu.ng",
|
||
},
|
||
}
|
||
|
||
export default async function RootLayout({
|
||
children,
|
||
}: {
|
||
children: React.ReactNode
|
||
}) {
|
||
const [navigation, settings, socialLinks, services] = await Promise.all([
|
||
getNavigation(),
|
||
getSiteSettings(),
|
||
getSocialLinks(),
|
||
getServices(),
|
||
])
|
||
|
||
const phone = settings?.contact?.phone || "0800 80 44 100"
|
||
const email = settings?.contact?.email || "kontakt@zweitmeinu.ng"
|
||
|
||
const headerServices = services.map((s) => ({
|
||
title: s.title,
|
||
slug: s.slug,
|
||
icon: s.icon ?? null,
|
||
}))
|
||
|
||
const footerServices = services.map((s) => ({
|
||
title: s.title.replace(/^Zweitmeinung\s+/, ""),
|
||
slug: s.slug,
|
||
}))
|
||
|
||
return (
|
||
<html lang="de">
|
||
<body className="font-body antialiased">
|
||
<a
|
||
href="#main-content"
|
||
className="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[200] focus:bg-white focus:px-4 focus:py-2 focus:rounded-lg focus:shadow-lg"
|
||
>
|
||
Zum Hauptinhalt springen
|
||
</a>
|
||
<div className="flex min-h-screen flex-col">
|
||
<TopBar settings={settings} />
|
||
<Header mainMenu={navigation?.mainMenu ?? null} services={headerServices} phone={phone} email={email} />
|
||
<main id="main-content" className="flex-1">
|
||
{children}
|
||
</main>
|
||
<EmergencyBanner settings={settings} />
|
||
<Footer socialLinks={socialLinks} settings={settings} services={footerServices} />
|
||
</div>
|
||
</body>
|
||
</html>
|
||
)
|
||
}
|