1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-28 14:16:41 +07:00

added error display

This commit is contained in:
Fedor Katurov 2020-10-23 17:50:19 +07:00
parent b4d55a49ba
commit 7d09eb26f5
7 changed files with 45 additions and 4 deletions

View file

@ -49,7 +49,16 @@ const setRelated = (state: INodeState, { related }: ReturnType<typeof nodeSetRel
const setCommentData = (
state: INodeState,
{ id, comment }: ReturnType<typeof nodeSetCommentData>
) => assocPath(['comment_data', id], comment, state);
) => ({
...state,
comment_data: {
...state.comment_data,
[id]: {
...(state.comment_data[id] || {}),
...comment,
},
},
})
const setTags = (state: INodeState, { tags }: ReturnType<typeof nodeSetTags>) =>
assocPath(['current', 'tags'], tags, state);