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

fixed comment submission

This commit is contained in:
Fedor Katurov 2020-04-10 14:03:34 +07:00
parent b38e9d2f1d
commit 90aa7fb4cd

View file

@ -197,7 +197,7 @@ function* onNodeLoad({ id, order = 'ASC' }: ReturnType<typeof nodeLoadNode>) {
return;
}
function* onPostComment({ id, is_before }: ReturnType<typeof nodePostComment>) {
function* onPostComment({ id }: ReturnType<typeof nodePostComment>) {
const { current, comment_data } = yield select(selectNode);
yield put(nodeSetSendingComment(true));
@ -218,12 +218,7 @@ function* onPostComment({ id, is_before }: ReturnType<typeof nodePostComment>) {
if (id === 0) {
yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT }));
if (is_before) {
yield put(nodeSetComments([comment, ...comments]));
} else {
yield put(nodeSetComments([...comments, comment]));
}
yield put(nodeSetComments([comment, ...comments]));
} else {
yield put(
nodeSet({