|
|
@ -1,12 +1,16 @@
|
|
|
|
import React from 'react'
|
|
|
|
import React from 'react'
|
|
|
|
|
|
|
|
|
|
|
|
const key = 'CARBON_CTA_1'
|
|
|
|
// Feature flag
|
|
|
|
|
|
|
|
const ACTIVE = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const key = 'CARBON_CTA_2'
|
|
|
|
|
|
|
|
|
|
|
|
function Toast() {
|
|
|
|
function Toast() {
|
|
|
|
const [open, setState] = React.useState(false)
|
|
|
|
const [open, setState] = React.useState(false)
|
|
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
React.useEffect(() => {
|
|
|
|
window.localStorage.removeItem('CARBON_CTA')
|
|
|
|
window.localStorage.removeItem('CARBON_CTA')
|
|
|
|
|
|
|
|
window.localStorage.removeItem('CARBON_CTA_1')
|
|
|
|
if (!window.localStorage.getItem(key)) {
|
|
|
|
if (!window.localStorage.getItem(key)) {
|
|
|
|
setState(true)
|
|
|
|
setState(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -16,6 +20,10 @@ function Toast() {
|
|
|
|
return null
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ACTIVE) {
|
|
|
|
|
|
|
|
return null
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!open) {
|
|
|
|
if (!open) {
|
|
|
|
return null
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
}
|
|
|
|