From 24a47dfa9d25c943bf1b51a1daf87140f76b3fbb Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 6 Jun 2018 03:38:41 +0200 Subject: displaying these gray ass thumbnails --- app/client/api/crud.types.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/client/api') 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, {}) + ])) -- cgit v1.2.3-70-g09d2