parent
669f3a74da
commit
c4d5d36268
@ -0,0 +1,33 @@
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
interface IDEContainerState {
|
||||
selected?: string;
|
||||
menuData?: any[];
|
||||
logBarStatus?: boolean;
|
||||
}
|
||||
|
||||
const initialState: IDEContainerState = {
|
||||
selected: '',
|
||||
menuData: [],
|
||||
logBarStatus: false
|
||||
};
|
||||
|
||||
const ideContainerSlice = createSlice({
|
||||
name: 'ideContainer',
|
||||
initialState,
|
||||
reducers: {
|
||||
updateSelected(state, action) {
|
||||
state.selected = action.payload;
|
||||
},
|
||||
updateMenuData(state, action) {
|
||||
state.menuData = action.payload;
|
||||
},
|
||||
updateLogBarStatus(state, action) {
|
||||
state.logBarStatus = action.payload;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const { updateSelected, updateMenuData, updateLogBarStatus } = ideContainerSlice.actions;
|
||||
|
||||
export default ideContainerSlice.reducer;
|
||||
Loading…
Reference in New Issue