2024-06-04 12:15:35 -07:00
|
|
|
import { createSlice } from "@reduxjs/toolkit";
|
|
|
|
|
|
2024-06-04 12:40:05 -07:00
|
|
|
const initialState = {
|
|
|
|
|
isLoading: false,
|
|
|
|
|
monitors: [],
|
|
|
|
|
success: null,
|
|
|
|
|
msg: null,
|
|
|
|
|
};
|
2024-06-04 12:15:35 -07:00
|
|
|
|
|
|
|
|
const monitorsSlice = createSlice({
|
|
|
|
|
name: "monitors",
|
|
|
|
|
initialState,
|
2024-06-04 12:40:05 -07:00
|
|
|
reducers: {
|
|
|
|
|
setMonitors: (state, action) => {
|
|
|
|
|
state.monitors = action.payload;
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-06-04 12:15:35 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const { setMonitors } = monitorsSlice.actions;
|
|
|
|
|
|
|
|
|
|
export default monitorsSlice.reducer;
|