14 lines
335 B
JavaScript
14 lines
335 B
JavaScript
import { all, takeEvery } from 'redux-saga/effects';
|
|
import { handleFailedActionSaga } from './failure';
|
|
|
|
export function* rootSaga() {
|
|
yield all([
|
|
takeEvery(patternFromRegExp(/^.*_FAILURE/), handleFailedActionSaga),
|
|
]);
|
|
}
|
|
|
|
export function patternFromRegExp(re) {
|
|
return (action) => {
|
|
return re.test(action.type);
|
|
};
|
|
} |