Comment out debug code

This commit is contained in:
Eric Bailey
2025-02-24 10:26:10 -06:00
parent 3899d6597f
commit c39b307e09
+17 -21
View File
@@ -1,4 +1,4 @@
import {AppBskyLabelerDefs, ComAtprotoModerationDefs} from '@atproto/api' import {AppBskyLabelerDefs} from '@atproto/api'
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query' import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
import {z} from 'zod' import {z} from 'zod'
@@ -11,16 +11,6 @@ import {
} from '#/state/queries/preferences' } from '#/state/queries/preferences'
import {useAgent} from '#/state/session' import {useAgent} from '#/state/session'
const BSKY_MOD_SERVICE = 'did:plc:ar7c4by46qjdydhdevvrndac'
const REASON_TYPES = [
ComAtprotoModerationDefs.REASONSPAM,
ComAtprotoModerationDefs.REASONVIOLATION,
ComAtprotoModerationDefs.REASONMISLEADING,
ComAtprotoModerationDefs.REASONSEXUAL,
ComAtprotoModerationDefs.REASONRUDE,
ComAtprotoModerationDefs.REASONOTHER,
]
const labelerInfoQueryKeyRoot = 'labeler-info' const labelerInfoQueryKeyRoot = 'labeler-info'
export const labelerInfoQueryKey = (did: string) => [ export const labelerInfoQueryKey = (did: string) => [
labelerInfoQueryKeyRoot, labelerInfoQueryKeyRoot,
@@ -83,21 +73,27 @@ export function useLabelersDetailedInfoQuery({dids}: {dids: string[]}) {
dids, dids,
detailed: true, detailed: true,
}) })
return res.data.views as AppBskyLabelerDefs.LabelerViewDetailed[]
/*
const BSKY_MOD_SERVICE = 'did:plc:ar7c4by46qjdydhdevvrndac'
const decorated = res.data.views.map(view => ({ const decorated = res.data.views.map(view => ({
...view, ...view,
reasonTypes: REASON_TYPES, reasonTypes: REASON_TYPES,
subjectTypes: subjectTypes: undefined,
// @ts-expect-error TODO subjectCollections: undefined,
view.creator.did === BSKY_MOD_SERVICE // subjectTypes:
? ['account', 'record', 'chat'] // // @ts-expect-error TODO
: ['account', 'record'], // view.creator.did === BSKY_MOD_SERVICE
subjectCollections: // ? ['account', 'record', 'chat']
// @ts-expect-error TODO // : ['account', 'record'],
view.creator.did === BSKY_MOD_SERVICE // subjectCollections:
? undefined // // @ts-expect-error TODO
: ['app.bsky.feed.post'], // view.creator.did === BSKY_MOD_SERVICE
// ? undefined
// : ['app.bsky.feed.post', 'app.bsky.actor.profile'],
})) }))
return decorated as AppBskyLabelerDefs.LabelerViewDetailed[] return decorated as AppBskyLabelerDefs.LabelerViewDetailed[]
*/
}, },
}) })
} }