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

NodeLayout

This commit is contained in:
muerwre 2019-08-25 16:10:46 +07:00
parent 684a4f4474
commit b154277de8
23 changed files with 332 additions and 65 deletions

View file

@ -1,5 +1,6 @@
import { INode, IValidationErrors } from '../types';
import { NODE_ACTIONS } from './constants';
import { INodeState } from './reducer';
export const nodeSave = (node: INode) => ({
node,
@ -10,3 +11,13 @@ export const nodeSetSaveErrors = (errors: IValidationErrors) => ({
errors,
type: NODE_ACTIONS.SET_SAVE_ERRORS,
});
export const nodeLoadNode = (id: string | number) => ({
id,
type: NODE_ACTIONS.LOAD_NODE,
});
export const nodeSetLoading = (is_loading: INodeState['is_loading']) => ({
is_loading,
type: NODE_ACTIONS.SET_LOADING,
});