From 58fcdc0dabce1b8b21ed99eadb40e8226bc2a05e Mon Sep 17 00:00:00 2001 From: lucasgarfield Date: Fri, 5 Jan 2024 17:33:09 +0100 Subject: [PATCH] V2Wizard/Store: Add wizard slice The V2 wizard's state will be managed using RTK. Adding a slice for the wizard lays the groundwork. --- src/store/index.ts | 2 ++ src/store/wizardSlice.ts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/store/wizardSlice.ts diff --git a/src/store/index.ts b/src/store/index.ts index 59ea711b..05cb1f7c 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -7,6 +7,7 @@ import { edgeApi } from './edgeApi'; import { imageBuilderApi } from './enhancedImageBuilderApi'; import { provisioningApi } from './provisioningApi'; import { rhsmApi } from './rhsmApi'; +import wizardSlice from './wizardSlice'; export const reducer = { [contentSourcesApi.reducerPath]: contentSourcesApi.reducer, @@ -15,6 +16,7 @@ export const reducer = { [rhsmApi.reducerPath]: rhsmApi.reducer, [provisioningApi.reducerPath]: provisioningApi.reducer, notifications: notificationsReducer, + wizard: wizardSlice, }; export const middleware = (getDefaultMiddleware: Function) => diff --git a/src/store/wizardSlice.ts b/src/store/wizardSlice.ts new file mode 100644 index 00000000..713191d1 --- /dev/null +++ b/src/store/wizardSlice.ts @@ -0,0 +1,16 @@ +import { createSlice } from '@reduxjs/toolkit'; + +type wizardState = {}; + +const initialState: wizardState = {}; + +export const wizardSlice = createSlice({ + name: 'wizard', + initialState, + reducers: { + initializeWizard: () => initialState, + }, +}); + +export const { initializeWizard } = wizardSlice.actions; +export default wizardSlice.reducer;