mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-06 01:31:49 +01:00
convo fetching in increments of 12
This commit is contained in:
parent
80319c7fcc
commit
a98367d27f
6 changed files with 70 additions and 16 deletions
|
|
@ -10,7 +10,9 @@ const initialState = {
|
|||
invocationId: null,
|
||||
chatGptLabel: null,
|
||||
promptPrefix: null,
|
||||
convosLoading: false
|
||||
convosLoading: false,
|
||||
pageNumber: 1,
|
||||
convos: [],
|
||||
};
|
||||
|
||||
const currentSlice = createSlice({
|
||||
|
|
@ -22,11 +24,14 @@ const currentSlice = createSlice({
|
|||
},
|
||||
setError: (state, action) => {
|
||||
state.error = action.payload;
|
||||
},
|
||||
incrementPage: (state) => {
|
||||
state.pageNumber = state.pageNumber + 1;
|
||||
}
|
||||
// setConvos: (state, action) => state.convos = action.payload,
|
||||
}
|
||||
});
|
||||
|
||||
export const { setConversation, setConvos, setError } = currentSlice.actions;
|
||||
export const { setConversation, setConvos, setError, incrementPage } = currentSlice.actions;
|
||||
|
||||
export default currentSlice.reducer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue