mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-31 23:58:50 +01:00
feat: pagination in nav
This commit is contained in:
parent
71fc86b9a6
commit
8289558d94
8 changed files with 84 additions and 46 deletions
|
|
@ -9,14 +9,14 @@ const postRequest = async (url, { arg }) => {
|
|||
return await axios.post(url, { arg });
|
||||
};
|
||||
|
||||
export const swr = (path, successCallback) => {
|
||||
const options = {};
|
||||
export const swr = (path, successCallback, options) => {
|
||||
const _options = {...options};
|
||||
|
||||
if (successCallback) {
|
||||
options.onSuccess = successCallback;
|
||||
_options.onSuccess = successCallback;
|
||||
}
|
||||
|
||||
return useSWR(path, fetcher, options);
|
||||
return useSWR(path, fetcher, _options);
|
||||
}
|
||||
|
||||
export default function manualSWR(path, type, successCallback) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue