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 <[email protected]>
This commit is contained in:
1 parent
8d988515f3
commit
398db5c5ec
2 files changed
+13
-3
No files matched your search
@@ -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<Metadata> {
|
||||
const t = getDictionary(await getLocale());
|
||||
@@ -15,10 +16,18 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
}
|
||||
|
||||
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 (
|
||||
<div>
|
||||
<PlaceholderImage tone="honey" className="h-[45vh] min-h-[320px] w-full" label={t.unternehmenPage.eyebrow} />
|
||||
<ContentImage
|
||||
src={image || null}
|
||||
alt={t.unternehmenPage.eyebrow}
|
||||
tone="honey"
|
||||
className="h-[45vh] min-h-[320px] w-full"
|
||||
label={t.unternehmenPage.eyebrow}
|
||||
/>
|
||||
<Container className="py-20">
|
||||
<SectionHeading
|
||||
level="h1"
|
||||
|
||||
Reference in new issue
Block a user