This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { Link } from "react-router-dom";
|
|
||||||
import styles from "../styles/CookieBanner.module.css";
|
|
||||||
|
|
||||||
const KEY = "cookieConsentAccepted";
|
const KEY = "cookieConsentAccepted";
|
||||||
|
|
||||||
@@ -22,20 +20,38 @@ export default function CookieBanner() {
|
|||||||
if (!visible) return null;
|
if (!visible) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.banner} role="dialog" aria-live="polite">
|
<div style={{
|
||||||
<div className={styles.bannerText}>
|
position: "fixed",
|
||||||
Ce site utilise des cookies pour améliorer votre expérience utilisateur
|
bottom: "1rem",
|
||||||
et analyser le trafic. En poursuivant votre navigation, vous acceptez
|
left: "1rem",
|
||||||
l'utilisation des cookies.
|
right: "1rem",
|
||||||
</div>
|
zIndex: 9999,
|
||||||
<div className={styles.actions}>
|
background: "rgba(15, 23, 42, 0.95)",
|
||||||
<Link to="/mentions-legales" className={styles.link}>
|
color: "#f8fafc",
|
||||||
En savoir plus
|
padding: "1rem 1.25rem",
|
||||||
</Link>
|
borderRadius: "1rem",
|
||||||
<button className={styles.button} onClick={handleAccept}>
|
display: "flex",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: "1rem"
|
||||||
|
}} role="dialog">
|
||||||
|
<p style={{ flex: 1, margin: 0 }}>
|
||||||
|
Ce site utilise des cookies pour améliorer votre expérience.
|
||||||
|
</p>
|
||||||
|
<button
|
||||||
|
onClick={handleAccept}
|
||||||
|
style={{
|
||||||
|
background: "#22c55e",
|
||||||
|
color: "white",
|
||||||
|
border: "none",
|
||||||
|
borderRadius: "9999px",
|
||||||
|
padding: "0.75rem 1.25rem",
|
||||||
|
fontWeight: 600,
|
||||||
|
cursor: "pointer"
|
||||||
|
}}
|
||||||
|
>
|
||||||
Accepter
|
Accepter
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user