mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Prewarm user's follow list, speed up discover plugins hook
This commit is contained in:
2 files changed
+6
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user