From 1a968b1d1f958ea769321845c0d41d84fe9abc79 Mon Sep 17 00:00:00 2001 From: MichalC <103170279+wSBMichalee@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:17:02 +0200 Subject: [PATCH] fix: dynamic year calculation in Footer and remove WhatsApp button from desktop Header --- scripts/seed.ts | 4 ++-- src/components/Footer/index.tsx | 9 ++++++++- src/components/Header/index.tsx | 17 ++--------------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/scripts/seed.ts b/scripts/seed.ts index cc2292a..2b7f004 100644 --- a/scripts/seed.ts +++ b/scripts/seed.ts @@ -419,7 +419,7 @@ async function run() { title: 'Działam w ramach b.b.h. Lohnsteuerhilfeverein e.V.', link: 'https://bbh-lohnsteuerhilfe.de', }, - copyright: '© 2024 Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Wszelkie prawa zastrzeżone.', + copyright: '© {year} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Wszelkie prawa zastrzeżone.', creator: { label: 'Realizacja:', name: 'NetScale', @@ -437,7 +437,7 @@ async function run() { title: 'Ich bin im Rahmen des b.b.h. Lohnsteuerhilfevereins e.V. tätig.', link: 'https://bbh-lohnsteuerhilfe.de', }, - copyright: '© 2024 Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Alle Rechte vorbehalten.', + copyright: '© {year} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Alle Rechte vorbehalten.', creator: { label: 'Erstellt von', name: 'NetScale', diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 8624229..a4d3a64 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -36,7 +36,14 @@ export function Footer({ const assocLink = association?.link; const assocLogo = association?.logo; - const copyrightText = getLocText(copyright) || `© ${new Date().getFullYear()} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski.`; + const currentYear = new Date().getFullYear(); + const rawCopyright = getLocText(copyright); + const copyrightText = rawCopyright + ? rawCopyright + .replace(/\b(19|20)\d{2}\b/, currentYear.toString()) + .replace('{year}', currentYear.toString()) + : `© ${currentYear} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. ${currentLocaleCode === 'de' ? 'Alle Rechte vorbehalten.' : 'Wszelkie prawa zastrzeżone.'}`; + const creatorLabel = getLocText(creator?.label); const creatorName = creator?.name; const creatorUrl = creator?.url; diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index cfa46e5..50a4298 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -63,21 +63,8 @@ export function Header({ navItems = [] }: { navItems?: any[] }) { {/* Right Actions & Hamburger */} -