diff options
author | dan <dan.abramov@gmail.com> | 2024-08-13 08:20:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 00:20:39 -0700 |
commit | 7e11b862e931b5351bd3463d984ab11ee9b46522 (patch) | |
tree | 9e75b7c031d01f7bd5ce8dc9c2f09bd61fbb162b /src/components/ReportDialog | |
parent | 1fce7a793d6fc67b58f0fccff327930cc0e062b0 (diff) | |
download | voidsky-7e11b862e931b5351bd3463d984ab11ee9b46522.tar.zst |
Remove .withProxy() calls (#4929)
Diffstat (limited to 'src/components/ReportDialog')
-rw-r--r-- | src/components/ReportDialog/SubmitView.tsx | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/src/components/ReportDialog/SubmitView.tsx b/src/components/ReportDialog/SubmitView.tsx index 7ceece75b..2def0fa4b 100644 --- a/src/components/ReportDialog/SubmitView.tsx +++ b/src/components/ReportDialog/SubmitView.tsx @@ -6,7 +6,6 @@ import {useLingui} from '@lingui/react' import {getLabelingServiceTitle} from '#/lib/moderation' import {ReportOption} from '#/lib/moderation/useReportOptions' -import {useGate} from '#/lib/statsig/statsig' import {useAgent} from '#/state/session' import {CharProgress} from '#/view/com/composer/char-progress/CharProgress' import * as Toast from '#/view/com/util/Toast' @@ -37,7 +36,6 @@ export function SubmitView({ const t = useTheme() const {_} = useLingui() const agent = useAgent() - const gate = useGate() const [details, setDetails] = React.useState<string>('') const [submitting, setSubmitting] = React.useState<boolean>(false) const [selectedServices, setSelectedServices] = React.useState<string[]>([ @@ -63,27 +61,17 @@ export function SubmitView({ } const results = await Promise.all( selectedServices.map(did => { - if (gate('session_withproxy_fix')) { - return agent - .createModerationReport(report, { - encoding: 'application/json', - headers: { - 'atproto-proxy': `${did}#atproto_labeler`, - }, - }) - .then( - _ => true, - _ => false, - ) - } else { - return agent - .withProxy('atproto_labeler', did) - .createModerationReport(report) - .then( - _ => true, - _ => false, - ) - } + return agent + .createModerationReport(report, { + encoding: 'application/json', + headers: { + 'atproto-proxy': `${did}#atproto_labeler`, + }, + }) + .then( + _ => true, + _ => false, + ) }), ) @@ -108,7 +96,6 @@ export function SubmitView({ onSubmitComplete, setError, agent, - gate, ]) return ( |