mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-01 23:56:41 +07:00
refactored flow page
This commit is contained in:
parent
93a1d4104b
commit
0b77e87778
10 changed files with 182 additions and 88 deletions
src/redux
|
@ -1,13 +1,13 @@
|
|||
import { createReducer } from '~/utils/reducer';
|
||||
import { INode, IError } from '../types';
|
||||
import { IError, IFlowNode, INode } from '../types';
|
||||
import { FLOW_HANDLERS } from './handlers';
|
||||
|
||||
export type IFlowState = Readonly<{
|
||||
isLoading: boolean;
|
||||
nodes: INode[];
|
||||
heroes: Partial<INode>[];
|
||||
recent: Partial<INode>[];
|
||||
updated: Partial<INode>[];
|
||||
nodes: IFlowNode[];
|
||||
heroes: IFlowNode[];
|
||||
recent: IFlowNode[];
|
||||
updated: IFlowNode[];
|
||||
search: {
|
||||
text: string;
|
||||
results: INode[];
|
||||
|
|
|
@ -147,6 +147,11 @@ export interface INode {
|
|||
commented_at?: string;
|
||||
}
|
||||
|
||||
export type IFlowNode = Pick<
|
||||
INode,
|
||||
'id' | 'flow' | 'description' | 'title' | 'thumbnail' | 'created_at'
|
||||
>;
|
||||
|
||||
export interface IComment {
|
||||
id: number;
|
||||
text: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue