dark mode alternates to light mode on dark theme, error state in progress

This commit is contained in:
Danny Avila 2023-02-08 10:49:38 -05:00
parent 5cd50e7826
commit 0c6dc8665b
6 changed files with 118 additions and 6 deletions

View file

@ -2,6 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
const initialState = {
active: false,
error: false,
conversationId: null,
parentMessageId: null,
};
@ -13,10 +14,13 @@ const currentSlice = createSlice({
setConversation: (state, action) => {
return { ...state, ...action.payload };
},
setError: (state, action) => {
state.error = action.payload;
},
}
});
//
export const { setConversation } = currentSlice.actions;
export const { setConversation, setError } = currentSlice.actions;
export default currentSlice.reducer;