bf9ba22c35
* fix: fix logging in and out with a refresh fixes #805 * simplify code * make test less flaky * fix dumb mistake
12 lines
442 B
JavaScript
12 lines
442 B
JavaScript
// When the user is logged out, we need to be sure to re-show all the "hidden from SSR" styles
|
|
// so that we don't get a blank page.
|
|
export function onUserIsLoggedOut () {
|
|
if (document.getElementById('hiddenFromSsrStyle')) {
|
|
return
|
|
}
|
|
let style = document.createElement('style')
|
|
style.setAttribute('id', 'hiddenFromSsrStyle')
|
|
style.textContent = '.hidden-from-ssr { opacity: 1 !important; }'
|
|
document.head.appendChild(style)
|
|
}
|