1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-03 00:26:41 +07:00

node layout placeholder

This commit is contained in:
muerwre 2019-08-25 16:19:33 +07:00
parent b154277de8
commit f121dea3ea
3 changed files with 29 additions and 13 deletions
src/redux/node

View file

@ -1,4 +1,6 @@
import { takeLatest, call, put, select } from 'redux-saga/effects';
import { takeLatest, call, put, select, delay } from 'redux-saga/effects';
import { push } from 'connected-react-router';
import { NODE_ACTIONS } from './constants';
import { nodeSave, nodeSetSaveErrors, nodeLoadNode, nodeSetLoading } from './actions';
import { postNode } from './api';
@ -7,7 +9,6 @@ import { flowSetNodes } from '../flow/actions';
import { ERRORS } from '~/constants/errors';
import { modalSetShown } from '../modal/actions';
import { selectFlowNodes } from '../flow/selectors';
import { push } from 'connected-react-router';
import { URLS } from '~/constants/urls';
function* onNodeSave({ node }: ReturnType<typeof nodeSave>) {
@ -35,6 +36,11 @@ function* onNodeLoad({ id }: ReturnType<typeof nodeLoadNode>) {
yield put(nodeSetSaveErrors({}));
yield put(push(URLS.NODE_URL(id)));
yield delay(1000);
yield put(nodeSetLoading(false));
yield put(nodeSetSaveErrors({}));
}
export default function* nodeSaga() {