pass starter pack in for editing

This commit is contained in:
Hailey
2024-06-09 16:47:45 -07:00
parent 0d69c9638c
commit 3da63d9481
4 changed files with 70 additions and 53 deletions
+8 -2
View File
@@ -6,7 +6,13 @@ import {useAgent, useSession} from 'state/session'
const RQKEY_ROOT = 'starter-pack'
export function useStarterPackQuery({did, rkey}: {did?: string; rkey: string}) {
export function useStarterPackQuery({
did,
rkey,
}: {
did?: string
rkey?: string
}) {
const agent = useAgent()
const uri = `at://${did}/app.bsky.graph.starterpack/${rkey}`
@@ -18,7 +24,7 @@ export function useStarterPackQuery({did, rkey}: {did?: string; rkey: string}) {
})
return res.data.starterPack
},
enabled: Boolean(did),
enabled: Boolean(did) && Boolean(rkey),
staleTime: STALE.MINUTES.FIVE,
})
}