mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
sagas for node creation dialog
This commit is contained in:
parent
265b075ddc
commit
1b6a81d27c
11 changed files with 119 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
import { INode, IValidationErrors, IComment, ITag } from '../types';
|
||||
import { NODE_ACTIONS } from './constants';
|
||||
import { NODE_ACTIONS, NODE_TYPES } from './constants';
|
||||
import { INodeState } from './reducer';
|
||||
|
||||
export const nodeSave = (node: INode) => ({
|
||||
|
@ -64,3 +64,18 @@ export const nodeSetTags = (tags: ITag[]) => ({
|
|||
type: NODE_ACTIONS.SET_TAGS,
|
||||
tags,
|
||||
});
|
||||
|
||||
export const nodeCreate = (node_type: INode['type']) => ({
|
||||
type: NODE_ACTIONS.CREATE,
|
||||
node_type,
|
||||
});
|
||||
|
||||
export const nodeEdit = (id: INode['id']) => ({
|
||||
type: NODE_ACTIONS.CREATE,
|
||||
id,
|
||||
});
|
||||
|
||||
export const nodeSetEditor = (editor: INode) => ({
|
||||
type: NODE_ACTIONS.SET_EDITOR,
|
||||
editor,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue