Initial commit

This commit is contained in:
Maksim Eltyshev
2019-08-31 04:07:25 +05:00
commit 36fe34e8e1
583 changed files with 91539 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import {
all, call, fork, take,
} from 'redux-saga/effects';
import watchers from './watchers';
import { initializeAppService } from './services';
import { socket } from '../../api';
import { removeAccessToken } from '../../utils/access-token-storage';
import ActionTypes from '../../constants/ActionTypes';
import Paths from '../../constants/Paths';
export default function* () {
yield all(watchers.map((watcher) => fork(watcher)));
yield call([socket, socket.connect]);
yield call(initializeAppService);
yield take(ActionTypes.LOGOUT);
yield call(removeAccessToken);
window.location.href = Paths.LOGIN;
}