"use client"; import Link from "next/link"; import { useEffect, useState } from "react"; import { useI18n } from "@/lib/i18n"; const STORAGE_KEY = "freezmo.consent.v1"; /** * The cookie notice. There are no cookies (see /cookies), so this is an * honest "here is what we store in your browser" line, dismissed once and * remembered. It sits below the immersive feeds in the stack (z-44) so it can * never cover a study session, and above the phone tab bar. */ export function CookieConsent() { const { t } = useI18n(); const [visible, setVisible] = useState(false); useEffect(() => { try { setVisible(window.localStorage.getItem(STORAGE_KEY) === null); } catch { /* private mode: no storage, no banner */ } }, []); if (!visible) return null; const dismiss = () => { try { window.localStorage.setItem(STORAGE_KEY, JSON.stringify({ at: Date.now() })); } catch { /* private mode */ } setVisible(false); }; return (
{t("consent.body")}{" "} {t("consent.link")}