1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-04 00:56:40 +07:00

left panel with git logs at boris

This commit is contained in:
Fedor Katurov 2020-06-09 11:20:46 +07:00
parent 13ac60a1e6
commit cb518f0528
15 changed files with 211 additions and 44 deletions

View file

@ -1,15 +1,17 @@
import { takeLatest, put, call } from 'redux-saga/effects';
import { BORIS_ACTIONS } from './constants';
import { borisSet } from './actions';
import { borisSet, borisSetStats } from './actions';
import { getBorisGitStats } from './api';
function* loadStats() {
yield put(borisSet({ is_loading: true }));
yield put(borisSetStats({ is_loading: true }));
const result = yield getBorisGitStats();
console.log(result);
yield put(borisSet({ is_loading: false }));
try {
const git = yield getBorisGitStats();
yield put(borisSetStats({ git, is_loading: false }));
} catch (e) {
yield put(borisSetStats({ git: [], is_loading: false }));
}
}
export default function* borisSaga() {