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

comment rendering

This commit is contained in:
muerwre 2019-08-27 13:37:53 +07:00
parent 398f44e232
commit 9531edcd19
10 changed files with 83 additions and 37 deletions

View file

@ -1,12 +1,13 @@
import { createReducer } from '~/utils/reducer';
import { INode, IComment } from '../types';
import { EMPTY_NODE } from './constants';
import { EMPTY_NODE, EMPTY_COMMENT } from './constants';
import { NODE_HANDLERS } from './handlers';
export type INodeState = Readonly<{
editor: INode;
current: INode;
comments: IComment[];
comment_data: IComment;
error: string;
errors: Record<string, string>;
@ -24,6 +25,7 @@ const INITIAL_STATE: INodeState = {
files: [],
},
current: { ...EMPTY_NODE },
comment_data: { ...EMPTY_COMMENT },
comments: [],
is_loading: false,