You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
717 B
TypeScript

import { createSlice } from '@reduxjs/toolkit';
interface IDEContainerState {
info: any;
menuData: any;
logBarStatus?: boolean;
}
const initialState: IDEContainerState = {
info: {},
menuData: {},
logBarStatus: false
};
const ideContainerSlice = createSlice({
name: 'ideContainer',
initialState,
reducers: {
updateInfo(state, action) {
state.info = action.payload;
},
updateMenuData(state, action) {
state.menuData = action.payload;
},
updateLogBarStatus(state, action) {
state.logBarStatus = action.payload;
}
}
});
export const { updateInfo, updateMenuData, updateLogBarStatus } = ideContainerSlice.actions;
export default ideContainerSlice.reducer;