1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-07 18:46:41 +07:00

getting node results for search

This commit is contained in:
Fedor Katurov 2020-04-18 16:06:10 +07:00
parent 41a35f1490
commit 94ac596b92
15 changed files with 308 additions and 164 deletions
src/redux/flow

View file

@ -1,43 +1,48 @@
import { FLOW_ACTIONS } from "./constants";
import { IFlowState } from "./reducer";
import { INode } from "../types";
import { FLOW_ACTIONS } from './constants';
import { IFlowState } from './reducer';
import { INode } from '../types';
export const flowSetNodes = (nodes: IFlowState["nodes"]) => ({
export const flowSetNodes = (nodes: IFlowState['nodes']) => ({
nodes,
type: FLOW_ACTIONS.SET_NODES
type: FLOW_ACTIONS.SET_NODES,
});
export const flowSetHeroes = (heroes: IFlowState["heroes"]) => ({
export const flowSetHeroes = (heroes: IFlowState['heroes']) => ({
heroes,
type: FLOW_ACTIONS.SET_HEROES
type: FLOW_ACTIONS.SET_HEROES,
});
export const flowSetRecent = (recent: IFlowState["recent"]) => ({
export const flowSetRecent = (recent: IFlowState['recent']) => ({
recent,
type: FLOW_ACTIONS.SET_RECENT
type: FLOW_ACTIONS.SET_RECENT,
});
export const flowSetUpdated = (updated: IFlowState["updated"]) => ({
export const flowSetUpdated = (updated: IFlowState['updated']) => ({
updated,
type: FLOW_ACTIONS.SET_UPDATED
type: FLOW_ACTIONS.SET_UPDATED,
});
export const flowSetCellView = (id: INode["id"], flow: INode["flow"]) => ({
export const flowSetCellView = (id: INode['id'], flow: INode['flow']) => ({
type: FLOW_ACTIONS.SET_CELL_VIEW,
id,
flow
});
export const flowSetRange = (range: IFlowState["range"]) => ({
range,
type: FLOW_ACTIONS.SET_RANGE
flow,
});
export const flowGetMore = () => ({
type: FLOW_ACTIONS.GET_MORE
type: FLOW_ACTIONS.GET_MORE,
});
export const flowSetFlow = (data: Partial<IFlowState>) => ({
type: FLOW_ACTIONS.SET_FLOW,
data
data,
});
export const flowSetSearch = (search: Partial<IFlowState['search']>) => ({
type: FLOW_ACTIONS.SET_SEARCH,
search,
});
export const flowChangeSearch = (search: Partial<IFlowState['search']>) => ({
type: FLOW_ACTIONS.CHANGE_SEARCH,
search,
});