File size: 454 Bytes
246d201 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import { createSlice } from "@reduxjs/toolkit";
import { AgentState } from "#/types/agent-state";
export const agentSlice = createSlice({
name: "agent",
initialState: {
curAgentState: AgentState.LOADING,
},
reducers: {
setCurrentAgentState: (state, action) => {
state.curAgentState = action.payload;
},
},
});
export const { setCurrentAgentState } = agentSlice.actions;
export default agentSlice.reducer;
|