mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
node cover display
This commit is contained in:
parent
c8593b7e7a
commit
ad0b9e6a28
9 changed files with 94 additions and 7 deletions
|
@ -10,6 +10,7 @@ import {
|
|||
nodeSetCommentData,
|
||||
nodeSetTags,
|
||||
nodeSetEditor,
|
||||
nodeSetCoverImage,
|
||||
} from './actions';
|
||||
import { INodeState } from './reducer';
|
||||
|
||||
|
@ -46,6 +47,11 @@ const setTags = (state: INodeState, { tags }: ReturnType<typeof nodeSetTags>) =>
|
|||
const setEditor = (state: INodeState, { editor }: ReturnType<typeof nodeSetEditor>) =>
|
||||
assocPath(['editor'], editor, state);
|
||||
|
||||
const setCoverImage = (
|
||||
state: INodeState,
|
||||
{ current_cover_image }: ReturnType<typeof nodeSetCoverImage>
|
||||
) => assocPath(['current_cover_image'], current_cover_image, state);
|
||||
|
||||
export const NODE_HANDLERS = {
|
||||
[NODE_ACTIONS.SET_SAVE_ERRORS]: setSaveErrors,
|
||||
[NODE_ACTIONS.SET_LOADING]: setLoading,
|
||||
|
@ -56,4 +62,5 @@ export const NODE_HANDLERS = {
|
|||
[NODE_ACTIONS.SET_COMMENT_DATA]: setCommentData,
|
||||
[NODE_ACTIONS.SET_TAGS]: setTags,
|
||||
[NODE_ACTIONS.SET_EDITOR]: setEditor,
|
||||
[NODE_ACTIONS.SET_COVER_IMAGE]: setCoverImage,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue