Add consent-first analytics privacy controls

This commit is contained in:
achraf
2026-06-07 16:11:21 +02:00
parent aa44f6c105
commit 0b2d38ee5e
15 changed files with 492 additions and 24 deletions

View File

@@ -0,0 +1,30 @@
import { Link } from "react-router-dom";
import { useAnalyticsConsent } from "../../core/privacy/analytics-consent-context";
export function Footer() {
const { choice, openSettings } = useAnalyticsConsent();
return (
<footer className="border-t border-[var(--p-border)] px-6 py-6 md:px-14">
<div className="mx-auto flex max-w-[1200px] flex-col gap-4 text-sm text-[var(--p-muted)] sm:flex-row sm:items-center sm:justify-between">
<span>
Plimi processes tool inputs locally in your browser.
</span>
<nav className="flex flex-wrap items-center gap-x-5 gap-y-2">
<Link
to="/privacy"
className="text-[var(--p-muted)] no-underline hover:text-[var(--p-text)]"
>
Privacy & legal
</Link>
<button
onClick={openSettings}
className="text-[var(--p-muted)] hover:text-[var(--p-text)]"
>
Analytics settings ({choice === "granted" ? "on" : "off"})
</button>
</nav>
</div>
</footer>
);
}