about summary refs log tree commit diff
path: root/src/components/ReportDialog/SelectReportOptionView.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2024-03-18 16:15:57 -0700
committerGitHub <noreply@github.com>2024-03-18 16:15:57 -0700
commit959121f394cd92a5931d618d1cadf6315663c59c (patch)
tree14b2affadf6ac3cc780d4e9339e4e0c42adfb95e /src/components/ReportDialog/SelectReportOptionView.tsx
parent1b10c7bc08cf517d2b3a943d8f8949ccc012028b (diff)
downloadvoidsky-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/SelectReportOptionView.tsx')
-rw-r--r--src/components/ReportDialog/SelectReportOptionView.tsx18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/components/ReportDialog/SelectReportOptionView.tsx b/src/components/ReportDialog/SelectReportOptionView.tsx
index 8ae0b52ec..037a62fce 100644
--- a/src/components/ReportDialog/SelectReportOptionView.tsx
+++ b/src/components/ReportDialog/SelectReportOptionView.tsx
@@ -18,7 +18,10 @@ import {
   useButtonContext,
 } from '#/components/Button'
 import {Divider} from '#/components/Divider'
-import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '#/components/icons/Chevron'
+import {
+  ChevronRight_Stroke2_Corner0_Rounded as ChevronRight,
+  ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft,
+} from '#/components/icons/Chevron'
 import {SquareArrowTopRight_Stroke2_Corner0_Rounded as SquareArrowTopRight} from '#/components/icons/SquareArrowTopRight'
 
 import {ReportDialogProps} from './types'
@@ -28,6 +31,7 @@ export function SelectReportOptionView({
 }: ReportDialogProps & {
   labelers: AppBskyLabelerDefs.LabelerViewDetailed[]
   onSelectReportOption: (reportOption: ReportOption) => void
+  goBack: () => void
 }) {
   const t = useTheme()
   const {_} = useLingui()
@@ -60,6 +64,18 @@ export function SelectReportOptionView({
 
   return (
     <View style={[a.gap_lg]}>
+      {props.labelers?.length > 1 ? (
+        <Button
+          size="small"
+          variant="solid"
+          color="secondary"
+          shape="round"
+          label={_(msg`Go back to previous step`)}
+          onPress={props.goBack}>
+          <ButtonIcon icon={ChevronLeft} />
+        </Button>
+      ) : null}
+
       <View style={[a.justify_center, a.gap_sm]}>
         <Text style={[a.text_2xl, a.font_bold]}>{i18n.title}</Text>
         <Text style={[a.text_md, t.atoms.text_contrast_medium]}>