Skip to content

Commit

Permalink
feat: add warning message (#320)
Browse files Browse the repository at this point in the history
* feat: add warning message

* fix: typo
  • Loading branch information
bhaskarSingh authored Mar 30, 2021
1 parent 15ed82c commit 3ffdb4f
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/components/NavBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,24 @@ function NavBar(props) {
}
}

// useEffect(() => {
// if (typeof window !== 'undefined') {
// let banner = localStorage.getItem('alertBanner');
// if (banner !== null) {
// setAlertBanner(JSON.parse(banner));
// } else {
// setAlertBanner(true);
// }
// }
// }, []);

// useEffect(() => {
// localStorage.setItem('alertBanner', JSON.stringify(alertBanner));
// }, [alertBanner]);
useEffect(() => {
if (typeof window !== 'undefined') {
let banner = localStorage.getItem('alertBanner');
if (banner !== null) {
setAlertBanner(JSON.parse(banner));
} else {
setAlertBanner(true);
}
}
}, []);

useEffect(() => {
localStorage.setItem('alertBanner', JSON.stringify(alertBanner));
}, [alertBanner]);

return (
<nav className={`bg-base-900 font-mulish`}>
{/* <div
<div
style={{ background: 'rgba(245,158,11,0.2)' }}
className={`text-white top-0 px-30 py-2 flex items-center justify-between ${
alertBanner === true ? 'flex' : 'hidden'
Expand All @@ -117,15 +117,15 @@ function NavBar(props) {
</div>
<div>
<p className="text-sm ">
Cryptoverse Wars is currently on Edo2 testnet. You will lose all
your Cryptobots when we will shift to Tezos mainnet.
Cryptoverse Wars is on mainnet now. Caution, smart contract has
not been audited by a third party.
</p>
</div>
</div>
<button onClick={() => setAlertBanner(false)}>
<MdClose size="24" />
</button>
</div> */}
</div>
<div className="px-30 py-8 flex justify-between items-center">
<Link to="/tezos">
<Theme className={`h-18 w-auto`} />
Expand Down

0 comments on commit 3ffdb4f

Please sign in to comment.