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

node cover display

This commit is contained in:
Fedor Katurov 2019-10-22 15:49:04 +07:00
parent c8593b7e7a
commit ad0b9e6a28
9 changed files with 94 additions and 7 deletions

View file

@ -1,5 +1,5 @@
import { createReducer } from '~/utils/reducer';
import { INode, IComment } from '../types';
import { INode, IComment, IFile } from '../types';
import { EMPTY_NODE, EMPTY_COMMENT } from './constants';
import { NODE_HANDLERS } from './handlers';
@ -8,6 +8,7 @@ export type INodeState = Readonly<{
current: INode;
comments: IComment[];
comment_data: Record<number, IComment>;
current_cover_image: IFile;
error: string;
errors: Record<string, string>;
@ -27,6 +28,7 @@ const INITIAL_STATE: INodeState = {
current: { ...EMPTY_NODE },
comment_data: { 0: { ...EMPTY_COMMENT } },
comments: [],
current_cover_image: null,
is_loading: false,
is_loading_comments: false,