18 lines
447 B
JavaScript
18 lines
447 B
JavaScript
|
import { createSlice } from "@reduxjs/toolkit";
|
||
|
|
||
|
export const coreSlice = createSlice({
|
||
|
name: "core",
|
||
|
initialState: {
|
||
|
plugin: false,
|
||
|
data: {}
|
||
|
},
|
||
|
reducers: {
|
||
|
setPlugin: (state, action) => ({...state, plugin: action.payload}),
|
||
|
setData: (state, action) => ({...state, data: action.payload}),
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export const { setPlugin, setData } = coreSlice.actions;
|
||
|
export const selectCore = state => state.core;
|
||
|
export default coreSlice.reducer;
|