diff options
Diffstat (limited to 'app/client/socket/index.js')
| -rw-r--r-- | app/client/socket/index.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/client/socket/index.js b/app/client/socket/index.js new file mode 100644 index 0000000..c0fed61 --- /dev/null +++ b/app/client/socket/index.js @@ -0,0 +1,27 @@ +import { store } from '../store' +import types from '../types' + +import { socket } from './socket.connection' +import * as system from './socket.system' +import * as live from './socket.live' + +export default { + socket, + system, + live, +} + +socket.on('status', (data) => { + console.log('got status', data.key, data.value) + store.dispatch({ type: types.socket.status }) + switch (data.key) { + case 'processing': + store.dispatch({ + type: 'SET_PARAM', + ...data, + }) + break + default: + break + } +}) |
