mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
letting only to add tags
This commit is contained in:
parent
9df5e022dd
commit
453f13f3db
5 changed files with 45 additions and 22 deletions
|
@ -8,6 +8,7 @@ import {
|
|||
nodeSetSendingComment,
|
||||
nodeSetComments,
|
||||
nodeSetCommentData,
|
||||
nodeSetTags,
|
||||
} from './actions';
|
||||
import { INodeState } from './reducer';
|
||||
|
||||
|
@ -38,6 +39,9 @@ const setCommentData = (
|
|||
{ id, comment }: ReturnType<typeof nodeSetCommentData>
|
||||
) => assocPath(['comment_data', id], comment, state);
|
||||
|
||||
const setTags = (state: INodeState, { tags }: ReturnType<typeof nodeSetTags>) =>
|
||||
assocPath(['current', 'tags'], tags, state);
|
||||
|
||||
export const NODE_HANDLERS = {
|
||||
[NODE_ACTIONS.SAVE]: setSaveErrors,
|
||||
[NODE_ACTIONS.SET_LOADING]: setLoading,
|
||||
|
@ -46,4 +50,5 @@ export const NODE_HANDLERS = {
|
|||
[NODE_ACTIONS.SET_SENDING_COMMENT]: setSendingComment,
|
||||
[NODE_ACTIONS.SET_COMMENTS]: setComments,
|
||||
[NODE_ACTIONS.SET_COMMENT_DATA]: setCommentData,
|
||||
[NODE_ACTIONS.SET_TAGS]: setTags,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue