import type { Metadata } from "next"; import type { ReactNode } from "react"; import Link from "next/link"; import { redirect } from "next/navigation"; import { Container } from "@/components/Section"; import { LogoutButton } from "@/components/auth/LogoutButton"; import { ResendVerificationButton } from "@/components/auth/ResendVerificationButton"; import { getCurrentCustomer } from "@/lib/auth/customer"; export const dynamic = "force-dynamic"; // Applies to every /konto/* page at once — private account area, never indexable. export const metadata: Metadata = { robots: { index: false, follow: false } }; const navItems = [ { title: "Übersicht", href: "/konto" }, { title: "Kalender", href: "/konto/kalender" }, { title: "Meine Termine", href: "/konto/termine" }, { title: "Profil", href: "/konto/profil" }, ]; export default async function KontoLayout({ children }: { children: ReactNode }) { const customer = await getCurrentCustomer(); if (!customer) redirect("/login?next=/konto"); return (

Mein Konto

Hallo, {customer.name}

{!customer.emailVerified && (

Bitte bestätige zuerst deine E-Mail-Adresse.

Erst danach kannst du Termine anfragen. Prüfe dein Postfach oder fordere unten eine neue E-Mail an.

)}
{children}
); }