From c10d2d856112a4b6ea96f21c6420df9851c91587 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Tue, 23 Mar 2021 18:02:44 +0100 Subject: [PATCH] =?UTF-8?q?:bug:=20r=C3=A9pare=20la=20page=20blanche=20sur?= =?UTF-8?q?=20firefox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mon-entreprise/source/Provider.tsx | 8 +++----- .../source/components/layout/Footer/Privacy.tsx | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/mon-entreprise/source/Provider.tsx b/mon-entreprise/source/Provider.tsx index ce33d4472..f140b32b9 100644 --- a/mon-entreprise/source/Provider.tsx +++ b/mon-entreprise/source/Provider.tsx @@ -23,12 +23,10 @@ import { inIframe } from './utils' const ATTracker = createTracker( process.env.AT_INTERNET_SITE_ID, - !!JSON.parse( - safeLocalStorage.getItem('tracking:do_not_track') ?? - navigator.doNotTrack ?? - 'false' - ) + safeLocalStorage.getItem('tracking:do_not_track') === '1' || + navigator.doNotTrack === '1' ) + declare global { interface Window { __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: any diff --git a/mon-entreprise/source/components/layout/Footer/Privacy.tsx b/mon-entreprise/source/components/layout/Footer/Privacy.tsx index 47cf8fa57..629ab2561 100644 --- a/mon-entreprise/source/components/layout/Footer/Privacy.tsx +++ b/mon-entreprise/source/components/layout/Footer/Privacy.tsx @@ -35,10 +35,10 @@ function PrivacyContent() { (evt) => { if (evt.target.checked) { tracker.privacy.setVisitorOptout() - safeLocalStorage.setItem('tracking:do_not_track', 'true') + safeLocalStorage.setItem('tracking:do_not_track', '1') } else { tracker.privacy.setVisitorMode('cnil', 'exempt') - safeLocalStorage.setItem('tracking:do_not_track', 'false') + safeLocalStorage.setItem('tracking:do_not_track', '0') } setValueChanged(true) },