7489f83564
Backend dropped the plain-text description field in favor of a single richText one (see docker/payload commit 1ba8d07). Renders formatted (bold/italic/multiple paragraphs) via the shared RichText component on the PDP (der-eine, tasse-die-pause); everywhere else (Passend-dazu cards, Product JSON-LD, homepage spotlight fallback) derives plain text at read time via a new extractPlainText() helper instead of a second field. Removes the description line from cart line items entirely — it only bloated the cart with no real benefit there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1Hu5bZ1kZUgKhab6yNwCt
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
import type { Metadata } from "next";
|
||
import { Hero } from "./components/Hero";
|
||
import { Pricing } from "./components/Pricing";
|
||
import { Footer } from "../components/Footer";
|
||
import { getProductBySlug, getCompanySettings } from "../lib/payload";
|
||
import { buildProductSchema } from "../lib/structuredData";
|
||
|
||
// Provisional scaffold page — naming/design concept still undecided (parked
|
||
// 2026-08-24). Metadata reads from the live product instead of a hardcoded
|
||
// tagline, unlike every other bespoke page here — see Hero.tsx's comment.
|
||
export async function generateMetadata(): Promise<Metadata> {
|
||
const product = await getProductBySlug("tasse-die-pause");
|
||
const title = product ? `${product.name} – einfach produktiv.` : "Tasse – einfach produktiv.";
|
||
const description = product?.descriptionText || undefined;
|
||
return {
|
||
title,
|
||
description,
|
||
alternates: { canonical: "/tasse-die-pause" },
|
||
openGraph: { title, description, url: "/tasse-die-pause" },
|
||
twitter: { title, description },
|
||
};
|
||
}
|
||
|
||
export default async function TasseDiePausePage() {
|
||
const [product, seller] = await Promise.all([
|
||
getProductBySlug("tasse-die-pause"),
|
||
getCompanySettings(),
|
||
]);
|
||
const productSchema = product
|
||
? buildProductSchema(product, "https://einfach-produktiv.mk360.de/tasse-die-pause", seller)
|
||
: null;
|
||
|
||
return (
|
||
<>
|
||
{productSchema && (
|
||
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(productSchema) }} />
|
||
)}
|
||
<main className="flex flex-col flex-1">
|
||
<Hero />
|
||
<Pricing />
|
||
</main>
|
||
<Footer />
|
||
</>
|
||
);
|
||
}
|