Add remaining features to fun picker

This commit is contained in:
Jamie Kyle
2025-04-07 12:47:38 -07:00
committed by GitHub
parent f4185e65dc
commit 9346beca24
51 changed files with 1512 additions and 659 deletions

View File

@@ -98,8 +98,13 @@ export function useInfiniteQuery<Query, Page>(
});
}
} catch (error) {
log.error('Error fetching first page', Errors.toLogFormat(error));
if (!signal.aborted) {
if (signal.aborted) {
update({
...stateRef.current,
pending: false,
});
} else {
log.error('Error fetching first page', Errors.toLogFormat(error));
update({
query: options.query,
pending: false,
@@ -155,8 +160,13 @@ export function useInfiniteQuery<Query, Page>(
});
}
} catch (error) {
log.error('Error fetching next page', Errors.toLogFormat(error));
if (!signal.aborted) {
if (signal.aborted) {
update({
...stateRef.current,
pending: false,
});
} else {
log.error('Error fetching next page', Errors.toLogFormat(error));
update({
query,
pending: false,