T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.ca/private_html/src/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.ca/private_html/src/components/CookieConsent.tsx
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import Link from 'next/link';

const CookieConsent = () => {
  const [language, setLanguage] = useState<'fr' | 'en'>('fr');

  const handleLanguageToggle = () => {
    const newLang = language === 'fr' ? 'en' : 'fr';
    setLanguage(newLang);
  };

  const router = useRouter();
  const [isVisible, setIsVisible] = useState(false);

  useEffect(() => {
    const consent = localStorage.getItem('cookieConsent');
    if (!consent) {
      setIsVisible(true);
    }
  }, []);

  const handleAccept = () => {
    localStorage.setItem('cookieConsent', 'true');
    setIsVisible(false);
  };

  if (!isVisible) return null;

  return (
    <div className="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 shadow-lg z-50">
      <div className="max-w-7xl mx-auto px-4 py-4">
        <div className="flex flex-col md:flex-row items-center justify-between gap-4">
          <div className="flex-1 text-sm text-gray-600">
            We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.
            <div className="mt-2 md:mt-0 md:inline-block md:ml-2">
              <Link href={language === 'en' ? '/en/privacy-policy' : '/privacy-policy'} className="text-primary hover:text-primary-dark">
                Privacy Policy
              </Link>
              {' • '}
              <Link href={language === 'en' ? '/en/cookie-policy' : '/cookie-policy'} className="text-primary hover:text-primary-dark">
                Cookie Policy
              </Link>
            </div>
          </div>
          <div className="flex items-center gap-4">
            <button
              onClick={handleAccept}
              className="bg-primary text-white px-6 py-2 rounded-full hover:bg-primary-dark transition-colors"
            >
              Accept
            </button>
            <button
              onClick={() => setIsVisible(false)}
              className="text-gray-500 hover:text-gray-700"
              aria-label="Close"
            >
              <span className="w-5 h-5 flex items-center justify-center text-xl font-bold">×</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  );
};

export default CookieConsent; 

CasperSecurity Mini