Closed lambtron closed 2 years ago
top bar will re appear on reloading the page.
That makes the button less useful IMO. Maybe something like this:
const onClick = () => localStorage.setItem('hellobar', content)
const onLoad = () => { if (localStorage.getItem('hellobar') === content) return }
top bar will re appear on reloading the page.
That makes the button less useful IMO. Maybe something like this:
const onClick = () => localStorage.setItem('hellobar', content) const onLoad = () => { if (localStorage.getItem('hellobar') === content) return }
In that case it should be a cookie so it don't FOUC on SSR.
Closing as not applicable anymore
click on it will remove the top bar.
top bar will re appear on reloading the page.