feature/IO-1113-Online-Dark-Mode - Toggle / Local storage solution

This commit is contained in:
Dave Richer
2025-08-08 11:53:51 -04:00
parent c9572d2db5
commit ec6c0279de
10 changed files with 131 additions and 41 deletions

View File

@@ -16,7 +16,8 @@ const INITIAL_STATE = {
},
jobReadOnly: false,
partnerVersion: null,
alerts: {}
alerts: {},
darkMode: false
};
const applicationReducer = (state = INITIAL_STATE, action) => {
@@ -104,6 +105,16 @@ const applicationReducer = (state = INITIAL_STATE, action) => {
alerts: newAlertsMap
};
}
case ApplicationActionTypes.TOGGLE_DARK_MODE:
return {
...state,
darkMode: !state.darkMode
};
case ApplicationActionTypes.SET_DARK_MODE:
return {
...state,
darkMode: action.payload
};
default:
return state;
}