semaphore/routes/_store/observers.js

12 lines
336 B
JavaScript

import { updateVerifyCredentialsForInstance } from '../_actions/instances'
import { updateLists } from '../_actions/lists'
export function observers (store) {
store.observe('currentInstance', (currentInstance) => {
if (currentInstance) {
updateVerifyCredentialsForInstance(currentInstance)
updateLists()
}
})
}