From c9c3bd98b7418845c4e7ee64060a4362eb2e3128 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 19 Mar 2024 11:38:17 -0700 Subject: Rework the labeler selection step of the report flow (#3269) * Rework the labeler selection step of the report flow * Fix: use gtMobile * Use primitives, fix avatar * Spacing tweaks * Show handle instead of description --------- Co-authored-by: Eric Bailey --- src/components/ReportDialog/SelectLabelerView.tsx | 75 ++++++++--------------- 1 file changed, 26 insertions(+), 49 deletions(-) (limited to 'src/components/ReportDialog/SelectLabelerView.tsx') diff --git a/src/components/ReportDialog/SelectLabelerView.tsx b/src/components/ReportDialog/SelectLabelerView.tsx index 300114fc4..817426355 100644 --- a/src/components/ReportDialog/SelectLabelerView.tsx +++ b/src/components/ReportDialog/SelectLabelerView.tsx @@ -5,12 +5,13 @@ import {useLingui} from '@lingui/react' import {AppBskyLabelerDefs} from '@atproto/api' export {useDialogControl as useReportDialogControl} from '#/components/Dialog' +import {getLabelingServiceTitle} from '#/lib/moderation' -import {atoms as a, useTheme} from '#/alf' +import {atoms as a, useTheme, useBreakpoints} from '#/alf' import {Text} from '#/components/Typography' import {Button, useButtonContext} from '#/components/Button' import {Divider} from '#/components/Divider' -import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '#/components/icons/Chevron' +import * as LabelingServiceCard from '#/components/LabelingServiceCard' import {ReportDialogProps} from './types' @@ -22,31 +23,29 @@ export function SelectLabelerView({ }) { const t = useTheme() const {_} = useLingui() + const {gtMobile} = useBreakpoints() return ( - + - Select moderation service + Select moderator - Who do you want to send this report to? + To whom would you like to send this report? - + {props.labelers.map(labeler => { return ( ) })} @@ -56,11 +55,9 @@ export function SelectLabelerView({ } function LabelerButton({ - title, - description, + labeler, }: { - title: string - description: string + labeler: AppBskyLabelerDefs.LabelerViewDetailed }) { const t = useTheme() const {hovered, pressed} = useButtonContext() @@ -75,41 +72,21 @@ function LabelerButton({ }, [t]) return ( - - - - {title} - - - {description} - - - - - + + + - - + + @{labeler.creator.handle} + + + ) } -- cgit 1.4.1