diff options
author | Kuwa Lee <kuwalee1069@gmail.com> | 2024-06-13 15:29:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 15:29:51 +0800 |
commit | ecd51bc6f9f7d755eb023c3d336c21ea5b1583e5 (patch) | |
tree | 0079550833142d4842a6e7bcff4d1540bad18870 /src/components/moderation/ProfileHeaderAlerts.tsx | |
parent | bd8f0e5a1c3a49b3f134081475f90473b87111b1 (diff) | |
parent | 7faa1d9131fc28e1c0acd4b4c7b7c2bbeabc2281 (diff) | |
download | voidsky-ecd51bc6f9f7d755eb023c3d336c21ea5b1583e5.tar.zst |
Merge branch 'bluesky-social:main' into zh
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} /> + )} </> ) } |