fix: Fix undefined query data and add fallback to Fontshare API
- Add gcTime parameter to TanStack Query config - Add response validation in fetchFn with detailed logging - Add fallback to Fontshare API when proxy fails - Add USE_PROXY_API flag for easy switching - Fix FontVirtualList generic type constraint - Simplify font registration logic - Add comprehensive console logging for debugging Fixes: Query data cannot be undefined error
This commit is contained in:
@@ -59,6 +59,7 @@ export abstract class BaseFontStore<TParams extends Record<string, any>> {
|
||||
queryKey: this.getQueryKey(params),
|
||||
queryFn: () => this.fetchFn(params),
|
||||
staleTime: 5 * 60 * 1000,
|
||||
gcTime: 10 * 60 * 1000,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user