mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added comment to redux
This commit is contained in:
parent
56f62950d2
commit
b4d7bd2c8a
2 changed files with 10 additions and 6 deletions
|
@ -1,14 +1,13 @@
|
|||
import uuid from 'uuid4';
|
||||
import { createReducer } from '~/utils/reducer';
|
||||
import { INode } from '../types';
|
||||
import { EMPTY_BLOCK, EMPTY_NODE } from './constants';
|
||||
import { INode, IComment } from '../types';
|
||||
import { EMPTY_NODE } from './constants';
|
||||
import { NODE_HANDLERS } from './handlers';
|
||||
import { EMPTY_FILE } from '../uploads/constants';
|
||||
|
||||
export type INodeState = Readonly<{
|
||||
is_loading: boolean;
|
||||
editor: INode;
|
||||
current: INode;
|
||||
current: Partial<INode>;
|
||||
comments: IComment[];
|
||||
error: string;
|
||||
errors: Record<string, string>;
|
||||
}>;
|
||||
|
@ -20,7 +19,8 @@ const INITIAL_STATE: INodeState = {
|
|||
blocks: [],
|
||||
files: [],
|
||||
},
|
||||
current: null,
|
||||
current: {},
|
||||
comments: [],
|
||||
is_loading: false,
|
||||
error: null,
|
||||
errors: {},
|
||||
|
|
|
@ -113,6 +113,10 @@ export interface INode {
|
|||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface IComment {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export type IUploadProgressHandler = (progress: ProgressEvent) => void;
|
||||
export type IError = ValueOf<typeof ERRORS>;
|
||||
export type IValidationErrors = Record<string, IError>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue