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:
parent
b38e9d2f1d
commit
90aa7fb4cd
1 changed files with 2 additions and 7 deletions
|
@ -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]));
|
||||
}
|
||||
} else {
|
||||
yield put(
|
||||
nodeSet({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue