Initial commit
This commit is contained in:
15
client/src/sagas/index.js
Executable file
15
client/src/sagas/index.js
Executable file
@@ -0,0 +1,15 @@
|
||||
import { call, select } from 'redux-saga/effects';
|
||||
|
||||
import loginSaga from './login';
|
||||
import appSaga from './app';
|
||||
import { accessTokenSelector } from '../selectors';
|
||||
|
||||
export default function* () {
|
||||
const accessToken = yield select(accessTokenSelector);
|
||||
|
||||
if (!accessToken) {
|
||||
yield call(loginSaga);
|
||||
}
|
||||
|
||||
yield call(appSaga);
|
||||
}
|
||||
Reference in New Issue
Block a user