From aa5638a1c31ce56d59696580f33733dcf0d7764c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 28 Apr 2019 15:54:41 +0200 Subject: refactor frontend, add threshold slider --- client/types.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 client/types.js (limited to 'client/types.js') diff --git a/client/types.js b/client/types.js new file mode 100644 index 0000000..6311816 --- /dev/null +++ b/client/types.js @@ -0,0 +1,16 @@ +export const asType = (type, name) => [type, name].join('_').toUpperCase() +export const tagAsType = (type, names) => ( + names.reduce((tags, name) => { + tags[name] = asType(type, name) + return tags + }, {}) +) + +export const api = tagAsType('api', [ + 'loading', 'loaded', 'error', +]) + +export const system = tagAsType('system', [ +]) + +export const init = '@@INIT' -- cgit v1.2.3-70-g09d2