Refactor settings to use stack to allow dark theme. Move theme to app reducer to allow persistence.

This commit is contained in:
Patrick Fic
2025-10-23 13:58:33 -07:00
parent f170192008
commit b1ee922066
15 changed files with 60 additions and 23 deletions

View File

@@ -6,6 +6,7 @@ const INITIAL_STATE = {
documentUploadInProgress: null,
documentUploadError: null,
deleteAfterUpload: false,
theme: "system",
};
const appReducer = (state = INITIAL_STATE, action) => {
@@ -43,6 +44,8 @@ const appReducer = (state = INITIAL_STATE, action) => {
...state,
deleteAfterUpload: !state.deleteAfterUpload,
};
case AppActionTypes.SET_THEME:
return { ...state, theme: action.payload };
default:
return state;
}