--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/reducers/syncReducer.js Fri Jul 28 19:40:35 2017 +0200
@@ -0,0 +1,23 @@
+import * as types from '../constants/actionTypes';
+
+export const lastSync = (state = 0, action) => {
+ switch (action.type) {
+ case types.SYNC_SET_LAST_SYNC:
+ return action.value;
+ case types.AUTH_LOGOUT:
+ return 0;
+ default:
+ return state;
+ }
+}
+
+export const isSynchronizing = (state = false, action) => {
+ switch (action.type) {
+ case types.SYNC_DO_SYNC:
+ return true;
+ case types.SYNC_END_SYNC:
+ return false;
+ default:
+ return state;
+ }
+}