Add CookieConsentBanner component and integrate cookie consent functionality

This commit is contained in:
2025-06-25 09:37:07 +09:00
parent 2403dd72e9
commit f55ca657e8
3 changed files with 144 additions and 8 deletions

View File

@@ -1,21 +1,27 @@
'use client';
import Link from 'next/link';
import Links from "@/data/Links";
import Links from '@/data/Links';
export default function Footer() {
const openCookieSettings = () => {
window.dispatchEvent(new Event('show-cookie-banner'));
};
return (
<footer
className="bg-white mt-auto py-10 px-6 md:px-12 lg:px-24 text-sm text-gray-600 border-t border-gray-200">
<footer className="bg-white mt-auto py-10 px-6 md:px-12 lg:px-24 text-sm text-gray-600 border-t border-gray-200">
<div className="flex flex-col md:flex-row justify-between items-center gap-4">
<div>
<p>&copy; {new Date().getFullYear()} Kanzlei Mustermann. Alle Rechte vorbehalten.</p>
</div>
<div className="space-x-4">
<div className="space-x-4">
<Link href={Links.imprint} className="hover:underline">Impressum</Link>
<Link href={Links.privacy} className="hover:underline">Datenschutz</Link>
</div>
<Link href={Links.imprint} className="hover:underline">Impressum</Link>
<Link href={Links.privacy} className="hover:underline">Datenschutz</Link>
<button onClick={openCookieSettings} className="hover:underline">
Cookie-Einstellungen
</button>
</div>
</div>
</footer>
);
}
}