Initial commit
This commit is contained in:
4
client/src/sagas/login/watchers/index.js
Executable file
4
client/src/sagas/login/watchers/index.js
Executable file
@@ -0,0 +1,4 @@
|
||||
import router from './router';
|
||||
import login from './login';
|
||||
|
||||
export default [router, login];
|
||||
12
client/src/sagas/login/watchers/login.js
Normal file
12
client/src/sagas/login/watchers/login.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { all, takeLatest } from 'redux-saga/effects';
|
||||
|
||||
import { authenticateService, clearAuthenticationErrorService } from '../services';
|
||||
import EntryActionTypes from '../../../constants/EntryActionTypes';
|
||||
|
||||
export default function* () {
|
||||
yield all([
|
||||
takeLatest(EntryActionTypes.AUTHENTICATE, ({ payload: { data } }) => authenticateService(data)),
|
||||
// eslint-disable-next-line max-len
|
||||
takeLatest(EntryActionTypes.AUTHENTICATION_ERROR_CLEAR, () => clearAuthenticationErrorService()),
|
||||
]);
|
||||
}
|
||||
8
client/src/sagas/login/watchers/router.js
Executable file
8
client/src/sagas/login/watchers/router.js
Executable file
@@ -0,0 +1,8 @@
|
||||
import { takeEvery } from 'redux-saga/effects';
|
||||
import { LOCATION_CHANGE } from 'connected-react-router';
|
||||
|
||||
import { locationChangedService } from '../services';
|
||||
|
||||
export default function* () {
|
||||
yield takeEvery(LOCATION_CHANGE, () => locationChangedService());
|
||||
}
|
||||
Reference in New Issue
Block a user