This commit is contained in:
Iliyan Angelov
2025-11-16 20:05:08 +02:00
parent 98ccd5b6ff
commit 48353cde9c
118 changed files with 9488 additions and 1336 deletions

View File

@@ -0,0 +1,29 @@
import React from 'react';
import { useCookieConsent } from '../../contexts/CookieConsentContext';
const CookiePreferencesLink: React.FC = () => {
const { hasDecided } = useCookieConsent();
if (!hasDecided) {
return null;
}
const handleClick = () => {
// Dispatch a custom event listened by the banner to reopen details.
window.dispatchEvent(new CustomEvent('open-cookie-preferences'));
};
return (
<button
type="button"
onClick={handleClick}
className="text-xs font-medium text-gray-500 underline hover:text-gray-700"
>
Cookie preferences
</button>
);
};
export default CookiePreferencesLink;