1
0
Fork 0
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:
Fedor Katurov 2021-11-06 19:48:07 +07:00
parent 93a1d4104b
commit 0b77e87778
10 changed files with 182 additions and 88 deletions
src/redux

View file

@ -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[];

View file

@ -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;