1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-26 00:29:48 +02:00
planka/client/src/sagas/index.js

16 lines
342 B
JavaScript
Raw Normal View History

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