Rename deadline to due date, update dependencies

This commit is contained in:
Maksim Eltyshev
2019-10-05 06:12:36 +05:00
parent 64acf0ac56
commit 51013b6a32
31 changed files with 113 additions and 115 deletions

View File

@@ -1,5 +1,5 @@
import {
all, call, fork, take,
all, apply, call, fork, take,
} from 'redux-saga/effects';
import watchers from './watchers';
@@ -12,11 +12,11 @@ import Paths from '../../constants/Paths';
export default function* () {
yield all(watchers.map((watcher) => fork(watcher)));
yield call([socket, socket.connect]);
yield call(initializeAppService);
yield apply(socket, socket.connect);
yield fork(initializeAppService);
yield take(ActionTypes.LOGOUT);
yield call(removeAccessToken);
yield call(removeAccessToken);
window.location.href = Paths.LOGIN;
}

View File

@@ -1,4 +1,6 @@
import { call, select, put } from 'redux-saga/effects';
import {
call, put, select, take,
} from 'redux-saga/effects';
import { accessTokenSelector } from '../../../selectors';
import { logout } from '../../../actions';
@@ -14,6 +16,7 @@ export default function* (method, ...args) {
} catch (error) {
if (error.code === ErrorCodes.UNAUTHORIZED) {
yield put(logout()); // TODO: next url
yield take();
}
throw error;

View File

@@ -14,13 +14,7 @@ import i18n from '../../../i18n';
import Paths from '../../../constants/Paths';
export function* loadLocaleService(language) {
try {
yield call(i18n.loadAppLocale, language);
return true;
} catch (error) {
return false;
}
yield call(i18n.loadAppLocale, language);
}
export function* initializeAppService() {

View File

@@ -5,7 +5,6 @@ import { authenticate, clearAuthenticationError } from '../../../actions';
export function* authenticateService(data) {
yield put(authenticate(data));
yield call(authenticateRequest, data);
}