Files
einfach-produktiv/app/der-eine/page.tsx
T
Marco 3e5c7b1a12 PDP hero CTA: plain "In den Warenkorb", not "\${product.name} bestellen"
Matches the closing ProductPricingPanel's own label now — both buttons
say the same generic thing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Eg6h91yngXmSnM51wxXM8
2026-08-30 00:12:32 +00:00

58 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { draftMode } from "next/headers";
import { ProductBlocks, getProductBlockContext } from "../components/ProductBlocks";
import { LiveProductContent } from "../components/LiveProductContent";
import { Footer } from "../components/Footer";
import { getProductBySlug, getCompanySettings } from "../lib/payload";
import { buildProductSchema } from "../lib/structuredData";
const title = "Der Eine. Für die eine Sache, die gerade zählt.";
// der-eine was the reference template the whole PDP block-builder system
// was designed to match (gallery sizing, black stepRow-facts icons — see
// ProductBlocks.tsx's own comments) — now migrated
// onto it itself, same as /tasse-die-pause before it. Testimonials.tsx
// dropped entirely rather than migrated: the PDP builder no longer offers
// testimonialsRef (removed 2026-08-29, unused everywhere; the planned
// replacement is a real reviews feature). Hero.tsx/Focus.tsx/
// Testimonials.tsx/Pricing.tsx/PasstDazu.tsx in ./components are now dead
// code, left for a follow-up cleanup pass rather than deleted here — same
// as /tasse-die-pause's own old components.
export async function generateMetadata(): Promise<Metadata> {
const product = await getProductBySlug("stift-kugelschreiber");
const description = product?.descriptionText || undefined;
return {
title,
description,
alternates: { canonical: "/der-eine" },
openGraph: { title, description, url: "/der-eine" },
twitter: { title, description },
};
}
export default async function DerEinePage() {
const { isEnabled: isPreview } = await draftMode();
const [product, seller] = await Promise.all([
getProductBySlug("stift-kugelschreiber"),
getCompanySettings(),
]);
if (!product) notFound();
const productSchema = buildProductSchema(product, "https://einfach-produktiv.mk360.de/der-eine", seller);
const ctx = isPreview ? await getProductBlockContext(product) : null;
return (
<>
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(productSchema) }} />
<main className="flex flex-col flex-1">
{ctx ? (
<LiveProductContent initialProduct={product} shipping={ctx.shipping} taxRate={ctx.taxRate} kleinunternehmer={ctx.kleinunternehmer} />
) : (
<ProductBlocks product={product} />
)}
</main>
<Footer />
</>
);
}