From d86cd48fad2e919bb625f6ee656fef3f54dadfed Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Sun, 23 Feb 2025 17:59:51 -0600 Subject: [PATCH] Add load and initial error state --- .../moderation/ReportDialog/index.tsx | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/components/moderation/ReportDialog/index.tsx b/src/components/moderation/ReportDialog/index.tsx index a2872a5da8..f847a9d490 100644 --- a/src/components/moderation/ReportDialog/index.tsx +++ b/src/components/moderation/ReportDialog/index.tsx @@ -48,7 +48,7 @@ export function ReportDialog( return ( - {subject && false ? : } + {subject ? : } ) } @@ -174,17 +174,19 @@ function Inner(props: ReportDialogProps) { activeIndex1={state.activeStepIndex1} /> {isLoading ? ( - - + + + + + + {/* Here to capture focus for a hot sec to prevent flash */} ) : labelersLoadError || !allLabelers ? ( - - - Something went wrong, please try again. - - + + Something went wrong, please try again. + ) : ( <> {state.selectedOption ? ( @@ -464,6 +466,22 @@ function OptionCard({ ) } +function OptionCardSkeleton() { + const t = useTheme() + return ( + + ) +} + function LabelerCard({ labeler, onSelect,