mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
17 lines
470 B
TypeScript
17 lines
470 B
TypeScript
import { takeLatest, put, call } from 'redux-saga/effects';
|
|
import { BORIS_ACTIONS } from './constants';
|
|
import { borisSet } from './actions';
|
|
import { getBorisGitStats } from './api';
|
|
|
|
function* loadStats() {
|
|
yield put(borisSet({ is_loading: true }));
|
|
|
|
const result = yield getBorisGitStats();
|
|
console.log(result);
|
|
|
|
yield put(borisSet({ is_loading: false }));
|
|
}
|
|
|
|
export default function* borisSaga() {
|
|
yield takeLatest(BORIS_ACTIONS.LOAD_STATS, loadStats);
|
|
}
|