From 398db5c5eccfde16b24511a53fd2dc54efff3d46 Mon Sep 17 00:00:00 2001 From: Nick Szaunig Date: Tue, 8 Sep 2026 22:33:17 +0200 Subject: [PATCH] feat: make /unternehmen hero image admin-editable too Same gap as /imkerei and /herkunft (previous commit): last remaining hardcoded PlaceholderImage in the app, now wired to the same content-registry "pages" group / ContentImage pattern. Verified: tsc clean, 151/151 tests pass, page still returns 200. Co-Authored-By: Claude Sonnet 5 --- src/app/unternehmen/page.tsx | 15 ++++++++++++--- src/lib/content-registry.ts | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/app/unternehmen/page.tsx b/src/app/unternehmen/page.tsx index d1431e4..bbe35e7 100644 --- a/src/app/unternehmen/page.tsx +++ b/src/app/unternehmen/page.tsx @@ -1,9 +1,10 @@ import type { Metadata } from "next"; import { Container, SectionHeading } from "@/components/ui"; -import { PlaceholderImage } from "@/components/placeholder-image"; +import { ContentImage } from "@/components/content-image"; import { BusinessInquiryForm } from "@/components/business-inquiry-form"; import { getLocale } from "@/i18n/locale"; import { getDictionary } from "@/i18n/get-dictionary"; +import { getContentValue } from "@/lib/content"; export async function generateMetadata(): Promise { const t = getDictionary(await getLocale()); @@ -15,10 +16,18 @@ export async function generateMetadata(): Promise { } export default async function UnternehmenPage() { - const t = getDictionary(await getLocale()); + const locale = await getLocale(); + const t = getDictionary(locale); + const image = await getContentValue("unternehmen.image", locale); return (
- + "" }, { key: "herkunft.image", group: "pages", labelDe: "Herkunft-Seite: Bild", labelEn: "Herkunft page: Image", type: "image", localized: false, getDefault: () => "" }, + { key: "unternehmen.image", group: "pages", labelDe: "Geschäftskunden-Seite: Bild", labelEn: "Business page: Image", type: "image", localized: false, getDefault: () => "" }, // --- Social Media (nicht lokalisiert, leer = Icon wird im Footer nicht // angezeigt, siehe components/site-footer.tsx Footer()) ---