From 491a92f71cf13bc8ef84db3b7fb24361013afb8e Mon Sep 17 00:00:00 2001 From: Alexander NeonXP Kiryukhin Date: Wed, 15 May 2019 03:32:55 +0300 Subject: Many fixes --- src/Store/store.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/Store') diff --git a/src/Store/store.ts b/src/Store/store.ts index 0929882..c26f019 100644 --- a/src/Store/store.ts +++ b/src/Store/store.ts @@ -4,12 +4,6 @@ import { createReducer } from 'redux-su'; import { composeWithDevTools } from 'redux-devtools-extension'; import { Portal, Link, Field } from '../Api/types'; -type Display = { - portals: string[], - fields: string[], - links: string[] -} - const reducers = { 'auth': createReducer({ 'authSet': (store: any, action: { v: string, csrf: string, user: any }) => ({ v: action.v, csrf: action.csrf, user: action.user, loading: false }), @@ -39,12 +33,10 @@ const reducers = { ({ ...store, links: { ...store.links, ...action.links } }), 'fieldsSet': (store: any, action: { fields: { [guid: string]: Field } }) => ({ ...store, fields: { ...store.fields, ...action.fields } }), - 'entitiesLoad': (store: any, action: { loading: number }) => - ({ ...store, loading: action.loading }), - 'entitiesDisplay': (store: any, action: { display: Display }) => - ({ ...store, display: action.display }), + 'setLoad': (store: any, action: { queue: string[][] }) => + ({ ...store, loadQueue: [...action.queue] }), - }, { portals: {}, fields: {}, links: {}, loading: 0, display: { portals: [], fields: [], links: [] } }) + }, { portals: {}, fields: {}, links: {}, loadQueue: [] }) } function extend(obj: any, src: any) { -- cgit v1.2.3