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

hooks to show node loader

This commit is contained in:
muerwre 2019-08-25 16:34:42 +07:00
parent f121dea3ea
commit da9ac62584
9 changed files with 79 additions and 41 deletions

View file

@ -12,8 +12,9 @@ export const nodeSetSaveErrors = (errors: IValidationErrors) => ({
type: NODE_ACTIONS.SET_SAVE_ERRORS,
});
export const nodeLoadNode = (id: string | number) => ({
export const nodeLoadNode = (id: string | number, node_type: INode['type']) => ({
id,
node_type,
type: NODE_ACTIONS.LOAD_NODE,
});
@ -21,3 +22,8 @@ export const nodeSetLoading = (is_loading: INodeState['is_loading']) => ({
is_loading,
type: NODE_ACTIONS.SET_LOADING,
});
export const nodeSetCurrent = (current: INodeState['current']) => ({
current,
type: NODE_ACTIONS.SET_CURRENT,
});