diff --git a/package.json b/package.json index 9a7cc828..4fcf791f 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "react-confetti": "^6.0.0", "react-device-detect": "^1.17.0", "react-dom": "^16.12.0", + "react-full-screen":"^1.0.2", "react-helmet": "^5.2.1", "react-icons": "^3.9.0", "react-live": "^2.2.2", diff --git a/src/components/NavBar/index.js b/src/components/NavBar/index.js index 43f0f2e3..d52404bd 100644 --- a/src/components/NavBar/index.js +++ b/src/components/NavBar/index.js @@ -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 (