mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-16 04:36:34 +01:00
Complete rewire state to redux
This commit is contained in:
parent
7978ddd871
commit
36ac055ae5
6 changed files with 14 additions and 55 deletions
|
|
@ -11,7 +11,6 @@ const currentSlice = createSlice({
|
|||
initialState,
|
||||
reducers: {
|
||||
setConversation: (state, action) => {
|
||||
console.log('in setConversation reducer');
|
||||
const { conversationId, parentMessageId } = action.payload;
|
||||
state.conversationId = conversationId;
|
||||
state.parentMessageId = parentMessageId;
|
||||
|
|
|
|||
|
|
@ -7,13 +7,11 @@ const currentSlice = createSlice({
|
|||
initialState,
|
||||
reducers: {
|
||||
setMessages: (state, action) => {
|
||||
console.log('in setMessages reducer');
|
||||
const { payload } = action;
|
||||
state = payload;
|
||||
return [...payload];
|
||||
},
|
||||
}
|
||||
});
|
||||
//
|
||||
|
||||
export const { setMessages } = currentSlice.actions;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue