new banner

main
Mike Fix 5 years ago
parent c8c76007c6
commit e5b2348daf
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -1,15 +1,14 @@
import React from 'react' import React from 'react'
// Feature flag // Feature flag
const ACTIVE = false const ACTIVE = true
const key = 'CARBON_CTA_2' const key = 'CARBON_CTA_3'
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_1')
window.localStorage.removeItem('CARBON_CTA_2') window.localStorage.removeItem('CARBON_CTA_2')
if (!window.localStorage.getItem(key)) { if (!window.localStorage.getItem(key)) {
setState(true) setState(true)
@ -36,13 +35,9 @@ function Toast() {
return ( return (
<div className="toast mb4"> <div className="toast mb4">
<div className="toast-content"> <div className="toast-content">
<p>The team that created Carbon has been acquired!</p> <p>Help fight the climate crisis by offsetting your carbon production</p>
<a <a href="/offsets" target="_blank" rel="noreferrer noopener">
href="https://dawnlabs.io/fossa-acquires-dawnlabs" Find out how
target="_blank"
rel="noreferrer noopener"
>
Read more
</a> </a>
<button className="close-toast" onClick={close}> <button className="close-toast" onClick={close}>
&times; &times;
@ -67,7 +62,6 @@ function Toast() {
margin-top: calc(var(--x4) * -1); margin-top: calc(var(--x4) * -1);
animation-name: slide; animation-name: slide;
animation-duration: 600ms; animation-duration: 600ms;
width: 610px;
max-width: 100vw; max-width: 100vw;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -90,7 +84,7 @@ function Toast() {
color: white; color: white;
border: none; border: none;
font-size: 100%; font-size: 100%;
margin-left: 32px; margin-left: 16px;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
} }

Loading…
Cancel
Save