V2Wizard/Store: Add wizard slice
The V2 wizard's state will be managed using RTK. Adding a slice for the wizard lays the groundwork.
This commit is contained in:
parent
f089080cb1
commit
58fcdc0dab
2 changed files with 18 additions and 0 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
16
src/store/wizardSlice.ts
Normal file
16
src/store/wizardSlice.ts
Normal file
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue