This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/store/helper.js
kolaente bd351550ee
Some checks failed
continuous-integration/drone/push Build is failing
Fix loading state for kanban board
2020-05-09 22:08:18 +02:00

11 lines
263 B
JavaScript

import {LOADING} from './mutation-types'
export const setLoading = context => {
const timeout = setTimeout(() => {
context.commit(LOADING, true, {root: true})
}, 100)
return () => {
clearTimeout(timeout)
context.commit(LOADING, false, {root: true})
}
}