'use client'; import React, { useState, useEffect } from 'react'; import { useTracking } from '../context/TrackingContext'; export const ConsentBanner: React.FC = () => { const { hasConsent, grantConsent } = useTracking(); const [show, setShow] = useState(false); useEffect(() => { // Show banner if consent not yet granted if (!hasConsent) { const timer = setTimeout(() => setShow(true), 1000); return () => clearTimeout(timer); } }, [hasConsent]); if (hasConsent || !show) { return null; } const handleAccept = () => { grantConsent(); setShow(false); }; const handleDecline = () => { setShow(false); }; return (

🍪 We value your privacy

We use tracking to improve your shopping experience and provide personalized recommendations. Your data is stored securely and never shared with third parties.

); };