Remove ToDo-Karten product and its dedicated /todo-cards page
Product deleted from Payload (no orders referenced it), so its bespoke page went with it — Navbar's WERKZEUGE_ROUTES and the sitemap no longer list it. The blog's "3minuten" relatedProduct pointer and the homepage's "ToDo-Karten" Werkzeuge card were cleared/removed in Payload directly (no code change needed there — CMS content). Also fixes a real bug found in the process: ProductBlocks.tsx's AddToCartButton calls never passed productId, silently falling back to its "todo-karten" default — every block-driven PDP's buy button (e.g. "Die Pause.") was adding the wrong product to the cart. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Eg6h91yngXmSnM51wxXM8
This commit is contained in:
@@ -63,7 +63,7 @@ function getNavLinks(singleActiveProduct: boolean) {
|
||||
// /der-eine and /tasse-die-pause (both bespoke product detail pages, same
|
||||
// "own route, not nested" shape as /todo-cards) added here for the same
|
||||
// reason (2026-08-25).
|
||||
const WERKZEUGE_ROUTES = ["/todo-cards", "/7-tage-klarheits-check", "/newsletter", "/der-eine", "/tasse-die-pause", "/lebensuhr", "/3x3-system"];
|
||||
const WERKZEUGE_ROUTES = ["/7-tage-klarheits-check", "/newsletter", "/der-eine", "/tasse-die-pause", "/lebensuhr", "/3x3-system"];
|
||||
|
||||
function isNavLinkActive(href: string, pathname: string, activeSection: string): boolean {
|
||||
if (href === "#werkzeuge") {
|
||||
|
||||
@@ -149,10 +149,27 @@ function renderProductBlock(block: ProductBlock, ctx: ProductBlockContext): Reac
|
||||
// selector here (SVG presentation attributes lose to any stylesheet
|
||||
// rule) scopes the recolor to PDPs only, without touching the shared
|
||||
// icon set or PageBlocks.tsx's own rendering.
|
||||
// Parallel fact cards, not a connected sequence — matches der-eine's
|
||||
// own hand-coded Focus.tsx ("Was kann er?") exactly: icon on top,
|
||||
// centered, no StepArrow connectors between them (those imply an
|
||||
// order these facts don't have). Reuses stepRow's existing icon/
|
||||
// title/description shape rather than a new block type; only the
|
||||
// rendering diverges from Pages.layout's own connected-arrow stepRow
|
||||
// (renderPageBlockSync), scoped to ProductBlocks.tsx. Icons black
|
||||
// (#231f20), same override reasoning as the quote block below.
|
||||
case "stepRow":
|
||||
return (
|
||||
<div key={block.id} className="[&_svg_*]:!stroke-[#231f20]">
|
||||
{renderPageBlockSync(block as PageBlock)}
|
||||
<div key={block.id} className="flex flex-col sm:flex-row gap-8 items-start w-full max-w-[75rem] mx-auto">
|
||||
{block.items.map((item) => {
|
||||
const Icon = STEP_ICONS[item.icon];
|
||||
return (
|
||||
<div key={item.id} className="flex flex-col gap-4 items-center text-center flex-1 max-w-xs sm:max-w-none mx-auto">
|
||||
{Icon && <span className="flex items-center justify-center h-16 [&_svg_*]:!stroke-[#231f20]">{Icon()}</span>}
|
||||
<p className="font-semibold text-body text-text-primary">{item.title}</p>
|
||||
<p className="text-body-sm text-text-primary w-full text-left md:text-center">{item.description}</p>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
// A PDP-specific full-bleed treatment for this one block type only —
|
||||
@@ -278,6 +295,7 @@ function ProductHero({ product, shipping, taxRate, kleinunternehmer, body }: Pro
|
||||
<AddToCartButton
|
||||
label={`${product.name} bestellen`}
|
||||
className="w-full sm:w-auto inline-flex items-center justify-center px-8 py-[0.8125rem] rounded-sm bg-brand hover:bg-brand-hover active:scale-[0.97] transition-all font-bold text-body text-text-primary text-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base"
|
||||
productId={product.id}
|
||||
numericId={product.numericId}
|
||||
outOfStock={fullyOutOfStock}
|
||||
maxQty={product.maxQty}
|
||||
@@ -358,6 +376,7 @@ function ProductPricingPanel({ product, shipping, taxRate, kleinunternehmer }: P
|
||||
<AddToCartButton
|
||||
label="In den Warenkorb"
|
||||
className="w-full inline-flex items-center justify-center px-6 py-[0.8125rem] rounded-sm bg-brand hover:bg-brand-hover active:scale-[0.97] transition-all font-bold text-body text-text-primary text-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-bg-muted"
|
||||
productId={product.id}
|
||||
numericId={product.numericId}
|
||||
outOfStock={fullyOutOfStock}
|
||||
maxQty={product.maxQty}
|
||||
|
||||
Reference in New Issue
Block a user