From 959121f394cd92a5931d618d1cadf6315663c59c Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 18 Mar 2024 16:15:57 -0700 Subject: Update the reporting flow to first select a recipient if the user has multiple labelers (#3258) --- src/components/ReportDialog/SubmitView.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/components/ReportDialog/SubmitView.tsx') 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('') const [submitting, setSubmitting] = React.useState(false) - const [selectedServices, setSelectedServices] = React.useState( - labelers?.map(labeler => labeler.creator.did) || [], - ) + const [selectedServices, setSelectedServices] = React.useState([ + selectedLabeler, + ]) const [error, setError] = React.useState('') const submit = React.useCallback(async () => { -- cgit 1.4.1