mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
#34 made submitting comment form
This commit is contained in:
parent
051b199d5d
commit
dad416e6e2
6 changed files with 97 additions and 65 deletions
|
@ -1,5 +1,5 @@
|
|||
import { INode, IValidationErrors, IComment, ITag, IFile } from '../types';
|
||||
import { NODE_ACTIONS, NODE_TYPES } from './constants';
|
||||
import { IComment, IFile, INode, ITag, IValidationErrors } from '../types';
|
||||
import { NODE_ACTIONS } from './constants';
|
||||
import { INodeState } from './reducer';
|
||||
|
||||
export const nodeSet = (node: Partial<INodeState>) => ({
|
||||
|
@ -50,6 +50,17 @@ export const nodePostComment = (id: number, is_before: boolean) => ({
|
|||
type: NODE_ACTIONS.POST_COMMENT,
|
||||
});
|
||||
|
||||
export const nodePostLocalComment = (
|
||||
nodeId: INode['id'],
|
||||
comment: IComment,
|
||||
callback: (e?: string) => void
|
||||
) => ({
|
||||
nodeId,
|
||||
comment,
|
||||
callback,
|
||||
type: NODE_ACTIONS.POST_LOCAL_COMMENT,
|
||||
});
|
||||
|
||||
export const nodeCancelCommentEdit = (id: number) => ({
|
||||
id,
|
||||
type: NODE_ACTIONS.CANCEL_COMMENT_EDIT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue