2018-12-16 12:39:16 -08:00
|
|
|
// 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
|
|
|
|
}
|
2019-08-03 13:49:37 -07:00
|
|
|
const style = document.createElement('style')
|
2018-12-16 12:39:16 -08:00
|
|
|
style.setAttribute('id', 'hiddenFromSsrStyle')
|
|
|
|
style.textContent = '.hidden-from-ssr { opacity: 1 !important; }'
|
|
|
|
document.head.appendChild(style)
|
|
|
|
}
|