iniital commit

This commit is contained in:
Alex Holliday committed 2024-06-24 11:56:25 -07:00
1 parent 173baf76be
commit 6c6070baae
4 files changed
+689 -221

No files matched your search

@@ -46,7 +46,14 @@ export const getMonitorsByUserId = createAsyncThunk(
const monitorsSlice = createSlice({
name: "monitors",
initialState,
reducers: {},
reducers: {
clearMonitorState: (state) => {
state.isLoading = false;
state.monitors = [];
state.success = null;
state.msg = null;
},
},
extraReducers: (builder) => {
builder
// *****************************************************
@@ -79,6 +86,7 @@ const monitorsSlice = createSlice({
state.monitors = action.payload.data;
})
.addCase(getMonitorsByUserId.rejected, (state, action) => {
console.log(action);
state.isLoading = false;
state.success = action.payload.success;
state.msg = action.payload.msg;