Refactor Footer component: implement openCookieSettings function to replace placeholder logic for cookie settings button.

This commit is contained in:
2025-06-26 10:36:05 +09:00
parent cdac942fca
commit e91962e52f

View File

@@ -3,6 +3,10 @@
import Link from "next/link";
export default function Footer() {
const openCookieSettings = () => {
window.dispatchEvent(new Event('show-cookie-banner'));
};
return (
<footer className="bg-white dark:bg-gray-950 border-t border-gray-200 dark:border-gray-800 px-4 py-8 text-sm">
<div className="max-w-6xl mx-auto flex flex-col md:flex-row items-center justify-between gap-4">
@@ -17,13 +21,7 @@ export default function Footer() {
<Link href="/datenschutz" className="hover:underline">
Datenschutz
</Link>
<button
onClick={() => {
// TODO: Cookie Modal öffnen
alert("Cookie-Einstellungen öffnen (noch nicht implementiert)");
}}
className="hover:underline"
>
<button onClick={openCookieSettings} className="hover:underline">
Cookie-Einstellungen
</button>
</div>