strike once for lurkers
This commit is contained in:
parent
8a9943a1af
commit
9c5937b9be
|
@ -122,9 +122,18 @@ export default function Header ({ sub }) {
|
||||||
if (!fired) {
|
if (!fired) {
|
||||||
const strike = useLightning()
|
const strike = useLightning()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTimeout(strike, randInRange(3000, 10000))
|
let isMounted = true
|
||||||
setFired(true)
|
if (!localStorage.getItem('striked')) {
|
||||||
}, [router.asPath])
|
setTimeout(() => {
|
||||||
|
if (isMounted) {
|
||||||
|
strike()
|
||||||
|
localStorage.setItem('striked', 'yep')
|
||||||
|
setFired(true)
|
||||||
|
}
|
||||||
|
}, randInRange(3000, 10000))
|
||||||
|
}
|
||||||
|
return () => { isMounted = false }
|
||||||
|
}, [])
|
||||||
}
|
}
|
||||||
return path !== '/login' && !path.startsWith('/invites') &&
|
return path !== '/login' && !path.startsWith('/invites') &&
|
||||||
<Button
|
<Button
|
||||||
|
|
Loading…
Reference in New Issue