
* fix: fix logging in and out with a refresh fixes #805 * simplify code * make test less flaky * fix dumb mistake
12 lines
273 B
JavaScript
12 lines
273 B
JavaScript
import { onUserIsLoggedOut } from '../../_actions/onUserIsLoggedOut'
|
|
|
|
export function logOutObservers (store) {
|
|
if (!process.browser) {
|
|
return
|
|
}
|
|
store.observe('isUserLoggedIn', isUserLoggedIn => {
|
|
if (!isUserLoggedIn) {
|
|
onUserIsLoggedOut()
|
|
}
|
|
})
|
|
}
|