Prewarm user's follow list, speed up discover plugins hook

This commit is contained in:
Alex Gleason committed 2025-12-04 20:42:46 -06:00
1 parent 67fc846ba3
commit 720aba0ff7
2 files changed
+6 -4

No files matched your search

+2 -4
View File
@@ -26,9 +26,7 @@ export function useDiscoverPlugins() {
return useQuery({
queryKey: ['discover-plugins', user?.pubkey, contacts],
queryFn: async (c) => {
const signal = AbortSignal.any([c.signal, AbortSignal.timeout(5000)]);
queryFn: async () => {
// Build authors list: current user + people they follow
const authors: string[] = [];
if (user?.pubkey) {
@@ -54,7 +52,7 @@ export function useDiscoverPlugins() {
limit: 100,
},
],
{ signal }
{ signal: AbortSignal.timeout(3000) }
);
// Transform events into DiscoveredPlugin objects