diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-06 03:38:41 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-06 03:38:41 +0200 |
| commit | 24a47dfa9d25c943bf1b51a1daf87140f76b3fbb (patch) | |
| tree | 38fe4ad6816e0958d5083fe16120a047c6ee94d3 /app/client/api | |
| parent | 2538fbd5471a61d51742281df0e019a2dd4ea24e (diff) | |
displaying these gray ass thumbnails
Diffstat (limited to 'app/client/api')
| -rw-r--r-- | app/client/api/crud.types.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/client/api/crud.types.js b/app/client/api/crud.types.js index 630bf83..83be34d 100644 --- a/app/client/api/crud.types.js +++ b/app/client/api/crud.types.js @@ -1,8 +1,11 @@ export const as_type = (a, b) => [a, b].join('_').toUpperCase() +export const with_type = (type, actions) => + actions.reduce((a, b) => (a[b] = as_type(type, b)) && a, {}) + export const crud_type = (type, actions=[]) => - actions.concat([ + with_type(type, actions.concat([ 'index_loading', 'index', 'index_error', @@ -24,5 +27,4 @@ export const crud_type = (type, actions=[]) => 'upload_complete', 'upload_error', 'sort', - ]) - .reduce((a, b) => (a[b] = as_type(type, b)) && a, {}) + ])) |
