diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-08-06 16:16:50 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-08-06 16:16:50 -0700 |
commit | 712b110ac67e7bff0729b903512bda7f4c77c8d9 (patch) | |
tree | dfe96418323ef7cb1295788667a0b754d7c948a9 /extension/react-app/src/redux | |
parent | 19060a30faf94454f4d69d01828a33985d07f109 (diff) | |
download | sncontinue-712b110ac67e7bff0729b903512bda7f4c77c8d9.tar.gz sncontinue-712b110ac67e7bff0729b903512bda7f4c77c8d9.tar.bz2 sncontinue-712b110ac67e7bff0729b903512bda7f4c77c8d9.zip |
refactor: :recycle: refactor bottom bar into Layout
Diffstat (limited to 'extension/react-app/src/redux')
-rw-r--r-- | extension/react-app/src/redux/slices/uiStateSlice.ts | 26 | ||||
-rw-r--r-- | extension/react-app/src/redux/store.ts | 4 |
2 files changed, 28 insertions, 2 deletions
diff --git a/extension/react-app/src/redux/slices/uiStateSlice.ts b/extension/react-app/src/redux/slices/uiStateSlice.ts index 837d19e9..d34596c9 100644 --- a/extension/react-app/src/redux/slices/uiStateSlice.ts +++ b/extension/react-app/src/redux/slices/uiStateSlice.ts @@ -5,6 +5,10 @@ export const uiStateSlice = createSlice({ initialState: { bottomMessage: undefined, bottomMessageCloseTimeout: undefined, + showDialog: false, + dialogMessage: "", + dialogEntryOn: false, + displayBottomMessageOnBottom: true, }, reducers: { setBottomMessage: (state, action) => { @@ -16,9 +20,27 @@ export const uiStateSlice = createSlice({ } state.bottomMessageCloseTimeout = action.payload; }, + setDialogMessage: (state, action) => { + state.dialogMessage = action.payload; + }, + setDialogEntryOn: (state, action) => { + state.dialogEntryOn = action.payload; + }, + setShowDialog: (state, action) => { + state.showDialog = action.payload; + }, + setDisplayBottomMessageOnBottom: (state, action) => { + state.displayBottomMessageOnBottom = action.payload; + }, }, }); -export const { setBottomMessage, setBottomMessageCloseTimeout } = - uiStateSlice.actions; +export const { + setBottomMessage, + setBottomMessageCloseTimeout, + setDialogMessage, + setDialogEntryOn, + setShowDialog, + setDisplayBottomMessageOnBottom, +} = uiStateSlice.actions; export default uiStateSlice.reducer; diff --git a/extension/react-app/src/redux/store.ts b/extension/react-app/src/redux/store.ts index d49513e5..aa8f5e7b 100644 --- a/extension/react-app/src/redux/store.ts +++ b/extension/react-app/src/redux/store.ts @@ -35,6 +35,10 @@ export interface RootStore { uiState: { bottomMessage: JSX.Element | undefined; bottomMessageCloseTimeout: NodeJS.Timeout | undefined; + displayBottomMessageOnBottom: boolean; + showDialog: boolean; + dialogMessage: string | JSX.Element; + dialogEntryOn: boolean; }; } |