mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
node no comments
This commit is contained in:
parent
b4d7bd2c8a
commit
96bdbb0e04
11 changed files with 103 additions and 61 deletions
|
@ -8,6 +8,7 @@ import {
|
|||
nodeLoadNode,
|
||||
nodeSetLoading,
|
||||
nodeSetCurrent,
|
||||
nodeSetLoadingComments,
|
||||
} from './actions';
|
||||
import { postNode, getNode } from './api';
|
||||
import { reqWrapper } from '../auth/sagas';
|
||||
|
@ -39,6 +40,7 @@ function* onNodeSave({ node }: ReturnType<typeof nodeSave>) {
|
|||
|
||||
function* onNodeLoad({ id, node_type }: ReturnType<typeof nodeLoadNode>) {
|
||||
yield put(nodeSetLoading(true));
|
||||
yield put(nodeSetLoadingComments(true));
|
||||
yield put(nodeSetSaveErrors({}));
|
||||
|
||||
if (node_type) yield put(nodeSetCurrent({ ...EMPTY_NODE, type: node_type }));
|
||||
|
@ -58,6 +60,10 @@ function* onNodeLoad({ id, node_type }: ReturnType<typeof nodeLoadNode>) {
|
|||
yield put(nodeSetSaveErrors({}));
|
||||
yield put(nodeSetCurrent(node));
|
||||
|
||||
// todo: load comments
|
||||
yield delay(500);
|
||||
yield put(nodeSetLoadingComments(false));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue