mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-22 10:16:13 +01:00
rearrange convo fetching for performance in progress
This commit is contained in:
parent
c00a2c902b
commit
e4d1ff2523
5 changed files with 21 additions and 8 deletions
|
|
@ -8,7 +8,15 @@ const postRequest = async (url, { arg }) => {
|
|||
return await axios.post(url, { arg });
|
||||
};
|
||||
|
||||
export const swr = (path) => useSWR(path, fetcher);
|
||||
export const swr = (path, successCallback) => {
|
||||
const options = {};
|
||||
|
||||
if (successCallback) {
|
||||
options.onSuccess = successCallback;
|
||||
}
|
||||
|
||||
return useSWR(path, fetcher);
|
||||
}
|
||||
|
||||
export default function manualSWR(path, type, successCallback) {
|
||||
const options = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue