From 7d28f3f958b8245210976b3dc5b72a251eb507fe Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Mon, 18 Feb 2019 16:54:31 +0100 Subject: [PATCH] Cache la newsletter sur la prod --- source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js index 682514ffb..fe5b553c5 100644 --- a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js +++ b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js @@ -32,11 +32,13 @@ const feedbackBlacklist = [ const LOCAL_STORAGE_KEY = 'app::newsletter::registered' const userAlreadyRegistered: boolean = - JSON.parse(safeLocalStorage.getItem(LOCAL_STORAGE_KEY)) || false + JSON.parse(safeLocalStorage.getItem(LOCAL_STORAGE_KEY)) || false const Footer = ({ colours: { colour }, tracker, t, sitePaths }) => { const [showNewsletterForm, toggleNewsletterForm] = useState( - !userAlreadyRegistered + !userAlreadyRegistered && !['mycompanyinfrance.fr', 'mon-entreprise.fr'].includes( + window.location.hostname + ) ) const onSubmit = () => { safeLocalStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(true))