Files
url_tracker_tool/node_modules/@tanstack/react-query/build/modern/suspense.js
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

25 lines
1.1 KiB
JavaScript

// src/suspense.ts
var defaultThrowOnError = (_error, query) => query.state.data === void 0;
var ensureSuspenseTimers = (defaultedOptions) => {
if (defaultedOptions.suspense) {
const clamp = (value) => value === "static" ? value : Math.max(value ?? 1e3, 1e3);
const originalStaleTime = defaultedOptions.staleTime;
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
if (typeof defaultedOptions.gcTime === "number") {
defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3);
}
}
};
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
errorResetBoundary.clearReset();
});
export {
defaultThrowOnError,
ensureSuspenseTimers,
fetchOptimistic,
shouldSuspend,
willFetch
};
//# sourceMappingURL=suspense.js.map