IO-1138 Offline detection.

This commit is contained in:
Patrick Fic
2021-05-27 13:32:57 -07:00
parent 842cb54867
commit 0b21b8d976
10 changed files with 99 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import ApplicationActionTypes from "./application.types";
const INITIAL_STATE = {
loading: false,
online: true,
breadcrumbs: [],
recentItems: [],
selectedHeader: "home",
@@ -21,6 +22,11 @@ const applicationReducer = (state = INITIAL_STATE, action) => {
...state,
selectedHeader: action.payload,
};
case ApplicationActionTypes.SET_ONLINE_STATUS:
return {
...state,
online: action.payload,
};
case ApplicationActionTypes.ADD_RECENT_ITEM:
return {
...state,