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:
parent
398f44e232
commit
9531edcd19
10 changed files with 83 additions and 37 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue