From ea981b31fe2de9a901bc76be0cb06618e09c8f93 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sun, 22 Sep 2019 11:21:27 -0700 Subject: [PATCH] turn off announcement --- components/Announcement.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/Announcement.js b/components/Announcement.js index 527c50c..5ebdab5 100644 --- a/components/Announcement.js +++ b/components/Announcement.js @@ -1,12 +1,16 @@ import React from 'react' -const key = 'CARBON_CTA_1' +// Feature flag +const ACTIVE = false + +const key = 'CARBON_CTA_2' function Toast() { const [open, setState] = React.useState(false) React.useEffect(() => { window.localStorage.removeItem('CARBON_CTA') + window.localStorage.removeItem('CARBON_CTA_1') if (!window.localStorage.getItem(key)) { setState(true) } @@ -16,6 +20,10 @@ function Toast() { return null } + if (!ACTIVE) { + return null + } + if (!open) { return null }