mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-21 06:13:33 +00:00
20 lines
413 B
TypeScript
20 lines
413 B
TypeScript
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
|
|
|
type State = {
|
|
workspaceProfile: WorkspaceProfile;
|
|
};
|
|
|
|
const globalSlice = createSlice({
|
|
name: "global",
|
|
initialState: {} as State,
|
|
reducers: {
|
|
setGlobalState: (_, action: PayloadAction<State>) => {
|
|
return action.payload;
|
|
},
|
|
},
|
|
});
|
|
|
|
export const { setGlobalState } = globalSlice.actions;
|
|
|
|
export default globalSlice.reducer;
|