customGpts persist through localStorage

This commit is contained in:
Daniel Avila 2023-03-04 17:39:06 -05:00
parent 62bb6ea8f8
commit 9c3a78f96b
22 changed files with 405 additions and 220 deletions

View file

@ -16,7 +16,7 @@ export const swr = (path, successCallback) => {
options.onSuccess = successCallback;
}
return useSWR(path, fetcher);
return useSWR(path, fetcher, options);
}
export default function manualSWR(path, type, successCallback) {
@ -27,4 +27,4 @@ export default function manualSWR(path, type, successCallback) {
}
const fetchFunction = type === 'get' ? fetcher : postRequest;
return useSWRMutation(path, fetchFunction, options);
};
}