finish removing loading entities
This commit is contained in:
parent
b9041d1434
commit
3870f6d316
|
@ -1,13 +1,12 @@
|
||||||
export const REQUEST = 'REQUEST';
|
export const REQUEST = 'REQUEST';
|
||||||
export const SUCCESS = 'SUCCESS';
|
export const SUCCESS = 'SUCCESS';
|
||||||
export const FAILURE = 'FAILURE';
|
export const FAILURE = 'FAILURE';
|
||||||
export const ENTITY = 'ENTITY';
|
|
||||||
|
|
||||||
function createRequestTypes(base) {
|
function createRequestTypes(base) {
|
||||||
return [REQUEST, SUCCESS, FAILURE].reduce((acc, type) => {
|
return [REQUEST, SUCCESS, FAILURE].reduce((acc, type) => {
|
||||||
acc[type] = `${base}_${type}`;
|
acc[type] = `${base}_${type}`;
|
||||||
return acc;
|
return acc;
|
||||||
}, { id: 0 });
|
}, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function action(type, payload = {}) {
|
function action(type, payload = {}) {
|
||||||
|
|
Loading…
Reference in New Issue