From 9365c0f1eea50d61aec03c848e29d46f4358fe7e Mon Sep 17 00:00:00 2001 From: Do Siki Date: Wed, 19 Aug 2026 16:53:16 +0200 Subject: [PATCH] feat(footer): CMS-editable company address (common.json footer.address) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'Budapest, Magyarország' lived hardcoded in site.ts. It now lives in common.json (footer.address), editable via the Közös szövegek tab, and both consumers (Footer, Kapcsolat page) read it from there — single source. Schema and types extended; site.ts keeps only the email. Closes MITHOME-73 --- proto/src/app/kapcsolat/page.tsx | 2 +- proto/src/components/Footer.tsx | 2 +- proto/src/config/site.ts | 2 +- proto/src/content/common.json | 3 ++- proto/src/content/schema.js | 2 +- proto/src/content/types.ts | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/proto/src/app/kapcsolat/page.tsx b/proto/src/app/kapcsolat/page.tsx index b8268a3..a086ab0 100755 --- a/proto/src/app/kapcsolat/page.tsx +++ b/proto/src/app/kapcsolat/page.tsx @@ -274,7 +274,7 @@ export default function ContactPage() {

{pageContent.info.company.title}

{siteConfig.general.name}

-

{siteConfig.contact.address}

+

{content.common.footer.address}

diff --git a/proto/src/components/Footer.tsx b/proto/src/components/Footer.tsx index 2fa0567..6a2d224 100755 --- a/proto/src/components/Footer.tsx +++ b/proto/src/components/Footer.tsx @@ -57,7 +57,7 @@ export default function Footer() { > 🏢 - {siteConfig.contact.address} + {content.common.footer.address} diff --git a/proto/src/config/site.ts b/proto/src/config/site.ts index 91d03bc..543be18 100755 --- a/proto/src/config/site.ts +++ b/proto/src/config/site.ts @@ -41,7 +41,7 @@ export const siteConfig: SiteConfig = { contact: { email: process.env.NEXT_PUBLIC_CONTACT_EMAIL || 'info@mozdit.hu', - address: 'Budapest, Magyarország', + // address lives in content/common.json (footer.address) — CMS-editable form: { title: 'Kapcsolatfelvétel', description: 'Legyen szíves érdeklődését vagy problémáját részletesen megfogalmazni.', diff --git a/proto/src/content/common.json b/proto/src/content/common.json index 33cd336..3de31da 100644 --- a/proto/src/content/common.json +++ b/proto/src/content/common.json @@ -18,6 +18,7 @@ "banner": "⚠ STAGING / TESZTKÖRNYEZET — A STAGING OLDALT LÁTOD" }, "footer": { - "copyright": "© 2002–{year} mozdIT Bt. Minden jog fenntartva." + "copyright": "© 2002–{year} mozdIT Bt. Minden jog fenntartva.", + "address": "Budapest, Magyarország" } } diff --git a/proto/src/content/schema.js b/proto/src/content/schema.js index 31bdbba..d14df02 100644 --- a/proto/src/content/schema.js +++ b/proto/src/content/schema.js @@ -15,7 +15,7 @@ const schemas = { labels: object({ required: string, features: string }), validation: object({ required: string, invalidEmail: string, minLength: string }), staging: object({ banner: string }), - footer: object({ copyright: string }), + footer: object({ copyright: string, address: string }), }), home: object({ hero: object({ title: string, subtitle: string, description: string, trustBullets: array(string), cta: object({ primary: ctaLink, secondary: ctaLink }) }), diff --git a/proto/src/content/types.ts b/proto/src/content/types.ts index 52ca993..74335c7 100755 --- a/proto/src/content/types.ts +++ b/proto/src/content/types.ts @@ -195,6 +195,7 @@ export interface CommonContent { } footer: { copyright: string + address: string } }