1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-28 17:49:43 +02:00
planka/client/src/sagas/index.js

16 lines
345 B
JavaScript
Raw Normal View History

2019-08-31 04:07:25 +05:00
import { call, select } from 'redux-saga/effects';
import loginSaga from './login';
import coreSaga from './core';
2019-08-31 04:07:25 +05:00
import { accessTokenSelector } from '../selectors';
export default function* rootSaga() {
2019-08-31 04:07:25 +05:00
const accessToken = yield select(accessTokenSelector);
if (!accessToken) {
yield call(loginSaga);
}
yield call(coreSaga);
2019-08-31 04:07:25 +05:00
}