diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-03-18 16:15:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 16:15:57 -0700 |
commit | 959121f394cd92a5931d618d1cadf6315663c59c (patch) | |
tree | 14b2affadf6ac3cc780d4e9339e4e0c42adfb95e /src/components/ReportDialog/SubmitView.tsx | |
parent | 1b10c7bc08cf517d2b3a943d8f8949ccc012028b (diff) | |
download | voidsky-959121f394cd92a5931d618d1cadf6315663c59c.tar.zst |
Update the reporting flow to first select a recipient if the user has multiple labelers (#3258)
Diffstat (limited to 'src/components/ReportDialog/SubmitView.tsx')
-rw-r--r-- | src/components/ReportDialog/SubmitView.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/ReportDialog/SubmitView.tsx b/src/components/ReportDialog/SubmitView.tsx index 99af64a2a..d47211c81 100644 --- a/src/components/ReportDialog/SubmitView.tsx +++ b/src/components/ReportDialog/SubmitView.tsx @@ -24,11 +24,13 @@ import {getAgent} from '#/state/session' export function SubmitView({ params, labelers, + selectedLabeler, selectedReportOption, goBack, onSubmitComplete, }: ReportDialogProps & { labelers: AppBskyLabelerDefs.LabelerViewDetailed[] + selectedLabeler: string selectedReportOption: ReportOption goBack: () => void onSubmitComplete: () => void @@ -37,9 +39,9 @@ export function SubmitView({ const {_} = useLingui() const [details, setDetails] = React.useState<string>('') const [submitting, setSubmitting] = React.useState<boolean>(false) - const [selectedServices, setSelectedServices] = React.useState<string[]>( - labelers?.map(labeler => labeler.creator.did) || [], - ) + const [selectedServices, setSelectedServices] = React.useState<string[]>([ + selectedLabeler, + ]) const [error, setError] = React.useState('') const submit = React.useCallback(async () => { |