aboutsummaryrefslogtreecommitdiff
path: root/src/reducers/firebase.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/reducers/firebase.js')
-rw-r--r--src/reducers/firebase.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/reducers/firebase.js b/src/reducers/firebase.js
new file mode 100644
index 0000000..2c7ba56
--- /dev/null
+++ b/src/reducers/firebase.js
@@ -0,0 +1,36 @@
+/**
+@license
+Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+*/
+
+import { AUTH_FAIL, AUTH_SUCCESS } from '../actions/firebase.js';
+
+const firebase = (state = {initialized: false}, action) => {
+ switch (action.type) {
+ case AUTH_SUCCESS:
+ alert(action.payload);
+ return {
+ ...state,
+ initialized: action.payload
+ };
+ break;
+
+ case AUTH_FAIL:
+ alert(action.payload);
+ return {
+ ...state,
+ initialized: action.payload
+ };
+ break;
+
+ default:
+ return state;
+ }
+};
+
+export default firebase;