pinafore/routes/_store/observers.js

11 lines
334 B
JavaScript
Raw Normal View History

import { updateVerifyCredentialsForInstance } from '../_actions/instances'
import { updateLists } from '../_actions/lists'
2018-01-28 20:51:48 +00:00
2018-01-28 21:09:39 +00:00
export function observers(store) {
2018-01-28 20:51:48 +00:00
store.observe('currentInstance', (currentInstance) => {
2018-01-28 23:44:33 +00:00
if (currentInstance) {
updateVerifyCredentialsForInstance(currentInstance)
updateLists()
2018-01-28 23:44:33 +00:00
}
2018-01-28 20:51:48 +00:00
})
}