* feat: update assignmetn filter component to function component * chore: redux hook tests * fix: tests * chore: update more components to hooks * chore: moar componentsAssignment * chore: moar component (StudentGroupsFilter) * chore: gradebook filter component update * chore: fix a few places of typo * chore: use global store for dispatch to avoid out of component * chore: compromise the test string for local machine * chore: linting * test: add more tests for coverage 100% * chore: linting * chore: add coverage badge on readme * chore: bump package version --------- Co-authored-by: Leangseu Kim <lkim@edx.org>
10 lines
289 B
JavaScript
10 lines
289 B
JavaScript
import { StrictDict } from 'utils';
|
|
// useDispatch hook wouldn't work here because it is out of scope of the component
|
|
import store from 'data/store';
|
|
|
|
export const actionHook = (action) => () => (...args) => store.dispatch(action(...args));
|
|
|
|
export default StrictDict({
|
|
actionHook,
|
|
});
|