summaryrefslogtreecommitdiff
path: root/frontend/src/redux/errors.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/redux/errors.js')
-rw-r--r--frontend/src/redux/errors.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/frontend/src/redux/errors.js b/frontend/src/redux/errors.js
new file mode 100644
index 00000000..1c247955
--- /dev/null
+++ b/frontend/src/redux/errors.js
@@ -0,0 +1,23 @@
+import Immutable from 'seamless-immutable'
+
+export const types = {
+ ERROR_RECEIVED_ON_WS: 'ERROR/RECEIVED_ON_WS',
+}
+
+export const actions = {
+ errorReceived: (error) => ({
+ type: types.ERROR_RECEIVED_ON_WS,
+ error
+ })
+}
+
+const initialState = Immutable.from([])
+
+export default (state = initialState, action) => {
+ switch (action.type) {
+ case types.ERROR_RECEIVED_ON_WS:
+ return state.concat([ action.error ])
+ default:
+ return state
+ }
+}
bgstack15