about summary refs log tree commit diff
path: root/src/state/queries
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/queries')
-rw-r--r--src/state/queries/actor-starter-packs.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/state/queries/actor-starter-packs.ts b/src/state/queries/actor-starter-packs.ts
index 487bcdfd9..670544dfe 100644
--- a/src/state/queries/actor-starter-packs.ts
+++ b/src/state/queries/actor-starter-packs.ts
@@ -11,7 +11,13 @@ import {useAgent} from '#/state/session'
 export const RQKEY_ROOT = 'actor-starter-packs'
 export const RQKEY = (did?: string) => [RQKEY_ROOT, did]
 
-export function useActorStarterPacksQuery({did}: {did?: string}) {
+export function useActorStarterPacksQuery({
+  did,
+  enabled = true,
+}: {
+  did?: string
+  enabled?: boolean
+}) {
   const agent = useAgent()
 
   return useInfiniteQuery<
@@ -30,7 +36,7 @@ export function useActorStarterPacksQuery({did}: {did?: string}) {
       })
       return res.data
     },
-    enabled: Boolean(did),
+    enabled: Boolean(did) && enabled,
     initialPageParam: undefined,
     getNextPageParam: lastPage => lastPage.cursor,
   })