mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
loading comments
This commit is contained in:
parent
76a3331719
commit
398f44e232
5 changed files with 21 additions and 6 deletions
|
@ -13,7 +13,7 @@ import {
|
|||
nodeSetSendingComment,
|
||||
nodeSetComments,
|
||||
} from './actions';
|
||||
import { postNode, getNode, postNodeComment } from './api';
|
||||
import { postNode, getNode, postNodeComment, getNodeComments } from './api';
|
||||
import { reqWrapper } from '../auth/sagas';
|
||||
import { flowSetNodes } from '../flow/actions';
|
||||
import { ERRORS } from '~/constants/errors';
|
||||
|
@ -65,7 +65,12 @@ function* onNodeLoad({ id, node_type }: ReturnType<typeof nodeLoadNode>) {
|
|||
yield put(nodeSetCurrent(node));
|
||||
|
||||
// todo: load comments
|
||||
yield delay(500);
|
||||
const {
|
||||
data: { comments },
|
||||
} = yield call(getNodeComments, { id });
|
||||
|
||||
yield put(nodeSetComments(comments || []));
|
||||
|
||||
yield put(nodeSetLoadingComments(false));
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue