make sure useEffect doesn't update state on every render

This commit is contained in:
keyan 2023-01-10 09:40:56 -06:00
parent 79af1b5852
commit d1a08eda36
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ export default function Footer ({ noLinks }) {
useEffect(() => {
setMounted(true)
setLightning(localStorage.getItem('lnAnimate') || 'yes')
})
}, [])
const toggleLightning = () => {
if (lightning === 'yes') {