summaryrefslogtreecommitdiff
path: root/src/Store
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <a.kiryukhin@mail.ru>2019-05-15 03:32:55 +0300
committerAlexander NeonXP Kiryukhin <a.kiryukhin@mail.ru>2019-05-15 03:32:55 +0300
commit491a92f71cf13bc8ef84db3b7fb24361013afb8e (patch)
treef4d45203428dcafa0b865e3604f5e9479d2c150b /src/Store
parent0c9db775302d15483385f0621611583e3a2407cd (diff)
Many fixes
Diffstat (limited to 'src/Store')
-rw-r--r--src/Store/store.ts14
1 files changed, 3 insertions, 11 deletions
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) {