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

optimizedbig amount of data rendering

This commit is contained in:
Fedor Katurov 2019-11-07 18:15:38 +07:00
parent 383990d556
commit d9f39a8d67
3 changed files with 92 additions and 50 deletions

View file

@ -17,7 +17,7 @@ import { IFlowState } from './reducer';
function* onGetFlow() {
const {
data: { nodes = null, heroes = null, recent = [], updated = [] },
data: { nodes = [], heroes = [], recent = [], updated = [] },
}: IResultWithStatus<{
nodes: IFlowState['nodes'];
heroes: IFlowState['heroes'];
@ -25,13 +25,13 @@ function* onGetFlow() {
updated: IFlowState['updated'];
}> = yield call(reqWrapper, getNodes, {});
if (!nodes || !nodes.length) {
yield put(flowSetNodes([]));
yield put(flowSetHeroes([]));
yield put(flowSetRecent([]));
yield put(flowSetUpdated([]));
return;
}
// if (!nodes || !nodes.length) {
// yield put(flowSetNodes([]));
// yield put(flowSetHeroes([]));
// yield put(flowSetRecent([]));
// yield put(flowSetUpdated([]));
// return;
// }
yield put(flowSetNodes(nodes));
yield put(flowSetHeroes(heroes));