make sure useEffect doesn't update state on every render
This commit is contained in:
parent
79af1b5852
commit
d1a08eda36
|
@ -136,7 +136,7 @@ export default function Footer ({ noLinks }) {
|
|||
useEffect(() => {
|
||||
setMounted(true)
|
||||
setLightning(localStorage.getItem('lnAnimate') || 'yes')
|
||||
})
|
||||
}, [])
|
||||
|
||||
const toggleLightning = () => {
|
||||
if (lightning === 'yes') {
|
||||
|
|
Loading…
Reference in New Issue