'use client'; import { useState, useEffect } from 'react'; import Link from 'next/link'; import { getConsentState, setConsentState } from '@/lib/client/analytics'; import { Transition } from '@headlessui/react'; import { Button } from '@/components/ui'; export function CookieConsentBanner() { const [show, setShow] = useState(false); useEffect(() => { // Check consent on mount const consent = getConsentState(); if (consent === 'undecided') { // Small delay to prevent layout thrashing on load const timer = setTimeout(() => setShow(true), 1000); return () => clearTimeout(timer); } }, []); const handleAccept = () => { setConsentState('accepted'); setShow(false); }; const handleDecline = () => { setConsentState('declined'); setShow(false); }; if (!show) return null; return (

🍪 We use cookies

We use strictly necessary cookies for authentication. Optional analytics is enabled only when you consent. See our Privacy Policy for details.

); }