1f537ccb06
- PasstDazu.tsx now takes a productSlug prop and reads its cross-sell target from the product's own relatedProduct field (Payload) instead of hardcoding "todo-karten" — reusable on any product page now. - payload.ts: Product/PayloadProduct gained relatedProduct, resolved via a bounded-recursion mapPayloadProduct call (safe — the fetch's depth:2 means the nested relation's own relatedProduct is never populated). - Focus.tsx icons: added the black stroked circle back around each glyph (matches icon-step-3.png exactly) — dropped in the previous pass by mistake while fixing the color/fill.
53 lines
1.5 KiB
TypeScript
53 lines
1.5 KiB
TypeScript
import type { Metadata } from "next";
|
||
import { Hero } from "./components/Hero";
|
||
import { Focus } from "./components/Focus";
|
||
import { PasstDazu } from "./components/PasstDazu";
|
||
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.";
|
||
const description =
|
||
"Der Eine. ist ein schlichter Kugelschreiber aus Metall. Angenehm in der Hand, klein genug für die Tasche und gemacht für alles, was kurz raus aus dem Kopf und irgendwo hin muss.";
|
||
|
||
export const metadata: Metadata = {
|
||
title,
|
||
description,
|
||
alternates: {
|
||
canonical: "/der-eine",
|
||
},
|
||
openGraph: {
|
||
title,
|
||
description,
|
||
url: "/der-eine",
|
||
},
|
||
twitter: {
|
||
title,
|
||
description,
|
||
},
|
||
};
|
||
|
||
export default async function DerEinePage() {
|
||
const [product, seller] = await Promise.all([
|
||
getProductBySlug("stift-kugelschreiber"),
|
||
getCompanySettings(),
|
||
]);
|
||
const productSchema = product
|
||
? buildProductSchema(product, "https://einfach-produktiv.mk360.de/der-eine", seller)
|
||
: null;
|
||
|
||
return (
|
||
<>
|
||
{productSchema && (
|
||
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(productSchema) }} />
|
||
)}
|
||
<main className="flex flex-col flex-1">
|
||
<Hero />
|
||
<Focus />
|
||
<PasstDazu productSlug="stift-kugelschreiber" />
|
||
</main>
|
||
<Footer />
|
||
</>
|
||
);
|
||
}
|