update readme, setup files, and clear convo bug

This commit is contained in:
Danny Avila 2023-03-07 14:43:55 -05:00
parent 5ad32e211f
commit a8eaf2452a
6 changed files with 28 additions and 17 deletions

View file

@ -38,11 +38,14 @@ const currentSlice = createSlice({
},
removeConvo: (state, action) => {
state.convos = state.convos.filter((convo) => convo.conversationId !== action.payload);
},
removeAll: (state) => {
state.convos = [];
}
}
});
export const { setConversation, setConvos, setError, incrementPage, removeConvo } =
export const { setConversation, setConvos, setError, incrementPage, removeConvo, removeAll } =
currentSlice.actions;
export default currentSlice.reducer;