diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-16 18:26:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 18:26:22 -0800 |
commit | 357c752a213dbcf77e5333fa180cfef20a33842d (patch) | |
tree | e955e57cc1252b5fe759cde29185d62bb71bc339 /src/view/com/modals/report/Modal.tsx | |
parent | 3043b324681f1702ca53831701fb5cecd14c0efb (diff) | |
download | voidsky-357c752a213dbcf77e5333fa180cfef20a33842d.tar.zst |
Move the current agent to a global and reset RQ queries on agent change (#1946)
Diffstat (limited to 'src/view/com/modals/report/Modal.tsx')
-rw-r--r-- | src/view/com/modals/report/Modal.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/view/com/modals/report/Modal.tsx b/src/view/com/modals/report/Modal.tsx index 06075547f..60c3f06b7 100644 --- a/src/view/com/modals/report/Modal.tsx +++ b/src/view/com/modals/report/Modal.tsx @@ -16,7 +16,7 @@ import {CollectionId} from './types' import {Trans, msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useModalControls} from '#/state/modals' -import {useSession} from '#/state/session' +import {getAgent} from '#/state/session' const DMCA_LINK = 'https://blueskyweb.xyz/support/copyright' @@ -39,7 +39,6 @@ type ReportComponentProps = } export function Component(content: ReportComponentProps) { - const {agent} = useSession() const {closeModal} = useModalControls() const pal = usePalette('default') const {isMobile} = useWebMediaQueries() @@ -70,7 +69,7 @@ export function Component(content: ReportComponentProps) { const $type = !isAccountReport ? 'com.atproto.repo.strongRef' : 'com.atproto.admin.defs#repoRef' - await agent.createModerationReport({ + await getAgent().createModerationReport({ reasonType: issue, subject: { $type, |