about summary refs log tree commit diff
path: root/src/state/queries/profile-feedgens.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/queries/profile-feedgens.ts')
-rw-r--r--src/state/queries/profile-feedgens.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/state/queries/profile-feedgens.ts b/src/state/queries/profile-feedgens.ts
index 652a123d9..fc0c91c27 100644
--- a/src/state/queries/profile-feedgens.ts
+++ b/src/state/queries/profile-feedgens.ts
@@ -7,8 +7,12 @@ type RQPageParam = string | undefined
 
 export const RQKEY = (did: string) => ['profile-feedgens', did]
 
-export function useProfileFeedgensQuery(did: string) {
+export function useProfileFeedgensQuery(
+  did: string,
+  opts?: {enabled?: boolean},
+) {
   const {agent} = useSession()
+  const enabled = opts?.enabled !== false
   return useInfiniteQuery<
     AppBskyFeedGetActorFeeds.OutputSchema,
     Error,
@@ -27,5 +31,6 @@ export function useProfileFeedgensQuery(did: string) {
     },
     initialPageParam: undefined,
     getNextPageParam: lastPage => lastPage.cursor,
+    enabled,
   })
 }