summaryrefslogtreecommitdiff
path: root/app/client
diff options
context:
space:
mode:
Diffstat (limited to 'app/client')
-rw-r--r--app/client/modules/samplernn/samplernn.reducer.js17
-rw-r--r--app/client/socket/index.js2
2 files changed, 14 insertions, 5 deletions
diff --git a/app/client/modules/samplernn/samplernn.reducer.js b/app/client/modules/samplernn/samplernn.reducer.js
index e486e3f..e70be5b 100644
--- a/app/client/modules/samplernn/samplernn.reducer.js
+++ b/app/client/modules/samplernn/samplernn.reducer.js
@@ -47,18 +47,27 @@ const samplernnReducer = (state = samplernnInitialState, action) => {
}
return
case types.folder.upload_error:
- console.log(action)
+ console.log(action)
return state
case types.folder.upload_progress:
- console.log(action)
+ console.log(action)
return state
case types.folder.upload_complete:
- console.log(action)
+ console.log(action)
return state
-
+ case types.socket.status:
+ return samplernnSocket(state, action)
default:
return state
}
}
+const samplernnSocket = (state, action) => {
+ console.log(action)
+ switch (action.key) {
+ default:
+ return state
+ }
+}
+
export default samplernnReducer
diff --git a/app/client/socket/index.js b/app/client/socket/index.js
index 1430ac9..87540f4 100644
--- a/app/client/socket/index.js
+++ b/app/client/socket/index.js
@@ -15,7 +15,7 @@ export default {
socket.on('status', (data) => {
console.log('got status', data.key, data.value)
- store.dispatch({ type: types.socket.status })
+ store.dispatch({ type: types.socket.status, ...data })
switch (data.key) {
case 'processing':
store.dispatch({