feat: add docker-compose for deployment
This commit is contained in:
30
src/components/CookieBanner.tsx
Normal file
30
src/components/CookieBanner.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function CookieBanner() {
|
||||
const [showBanner, setShowBanner] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const cookieConsent = localStorage.getItem('cookieConsent');
|
||||
if (!cookieConsent) {
|
||||
setShowBanner(true);
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleAccept = () => {
|
||||
localStorage.setItem('cookieConsent', 'true');
|
||||
setShowBanner(false);
|
||||
};
|
||||
|
||||
if (!showBanner) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="fixed bottom-0 left-0 w-full bg-gray-800 text-white p-4 flex flex-col md:flex-row justify-center items-center z-50 space-y-2 md:space-y-0 md:space-x-4">
|
||||
<p>Wir verwenden Cookies, um Ihre Erfahrung zu verbessern.</p>
|
||||
<button onClick={handleAccept} className="bg-flyer-yellow text-black px-4 py-2 rounded">Akzeptieren</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user