From c4529ef6011efcecd608d6a6e94d22bd025fd389 Mon Sep 17 00:00:00 2001 From: DerTyp7 Date: Thu, 9 Oct 2025 18:09:33 +0200 Subject: [PATCH] Do not show imprint when disabled in config.json --- public/config.json | 2 +- src/components/Footer.tsx | 12 +++++++++--- src/components/Imprint.tsx | 6 ++++++ src/contexts/configExports.ts | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/public/config.json b/public/config.json index 7f7031f..9832e7b 100644 --- a/public/config.json +++ b/public/config.json @@ -25,7 +25,7 @@ } ], "imprint": { - "enable": true, + "enable": false, "headline": "Imprint / Legal Notice", "name": "[Your Full Name]", "address": "[Your Full Address: Street and House Number, Postcode City]", diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 483f54a..af3490a 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,5 +1,6 @@ 'use client'; +import { useConfig } from '@/contexts/configExports'; import styles from '@/styles/Footer.module.scss'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; @@ -12,6 +13,7 @@ interface FooterProps { export default function Footer({ currentYear }: FooterProps) { const [isInLandingPage, setIsInLandingPage] = useState(false); const pathname = usePathname(); + const { config } = useConfig(); useEffect(() => { setIsInLandingPage(pathname === '/'); @@ -20,9 +22,13 @@ export default function Footer({ currentYear }: FooterProps) { return (