mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-16 07:28:09 +01:00
fix: convos correctly delete
This commit is contained in:
parent
17c01aa252
commit
f2b092545f
8 changed files with 28 additions and 19 deletions
|
|
@ -35,10 +35,14 @@ const currentSlice = createSlice({
|
|||
state.convos = [...state.convos, ...newConvos].sort(
|
||||
(a, b) => new Date(b.created) - new Date(a.created)
|
||||
);
|
||||
},
|
||||
removeConvo: (state, action) => {
|
||||
state.convos = state.convos.filter((convo) => convo.conversationId !== action.payload);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const { setConversation, setConvos, setError, incrementPage } = currentSlice.actions;
|
||||
export const { setConversation, setConvos, setError, incrementPage, removeConvo } =
|
||||
currentSlice.actions;
|
||||
|
||||
export default currentSlice.reducer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue