Fix up typescript config (#9910)

This commit is contained in:
Samuel Newman
2026-02-20 18:07:17 +00:00
committed by GitHub
parent 35f9ed82b9
commit f3cc850b62
7 changed files with 119 additions and 53 deletions
+6 -4
View File
@@ -19,8 +19,10 @@ export function usePostQuery(uri: string | undefined) {
const agent = useAgent()
return useQuery<AppBskyFeedDefs.PostView>({
queryKey: RQKEY(uri || ''),
async queryFn() {
const urip = new AtUri(uri!)
queryFn: async () => {
if (!uri) throw new Error('[unreachable] No URI provided')
const urip = new AtUri(uri)
if (!urip.host.startsWith('did:')) {
const res = await agent.resolveHandle({
@@ -158,7 +160,7 @@ export function usePostLikeMutationQueue(
return queueToggle(false)
}, [queryClient, postUri, queueToggle])
return [queueLike, queueUnlike]
return [queueLike, queueUnlike] as const
}
function usePostLikeMutation(
@@ -286,7 +288,7 @@ export function usePostRepostMutationQueue(
return queueToggle(false)
}, [queryClient, postUri, queueToggle])
return [queueRepost, queueUnrepost]
return [queueRepost, queueUnrepost] as const
}
function usePostRepostMutation(