diff options
Diffstat (limited to 'src/components/moderation/ProfileHeaderAlerts.tsx')
-rw-r--r-- | src/components/moderation/ProfileHeaderAlerts.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/components/moderation/ProfileHeaderAlerts.tsx b/src/components/moderation/ProfileHeaderAlerts.tsx index 287a0bdde..4b48b142d 100644 --- a/src/components/moderation/ProfileHeaderAlerts.tsx +++ b/src/components/moderation/ProfileHeaderAlerts.tsx @@ -43,7 +43,13 @@ export function ProfileHeaderAlerts({ ) } -function ProfileLabel({cause}: {cause: ModerationCause}) { +export function ProfileLabel({ + cause, + disableDetailsDialog, +}: { + cause: ModerationCause + disableDetailsDialog?: boolean +}) { const t = useTheme() const control = useModerationDetailsDialogControl() const desc = useModerationCauseDescription(cause) @@ -51,6 +57,7 @@ function ProfileLabel({cause}: {cause: ModerationCause}) { return ( <> <Button + disabled={disableDetailsDialog} label={desc.name} onPress={() => { control.open() @@ -87,7 +94,9 @@ function ProfileLabel({cause}: {cause: ModerationCause}) { )} </Button> - <ModerationDetailsDialog control={control} modcause={cause} /> + {!disableDetailsDialog && ( + <ModerationDetailsDialog control={control} modcause={cause} /> + )} </> ) } |