diff options
author | Eric Bailey <git@esb.lol> | 2024-06-12 21:53:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 04:53:32 +0200 |
commit | 28ba99917afb5d556a3cb3819cd45712eaf6d196 (patch) | |
tree | e875ae38baf9244062489399a35e336680943c90 /src/components/moderation | |
parent | d989128e5b086fc60aea01ba991039c4e66165c6 (diff) | |
download | voidsky-28ba99917afb5d556a3cb3819cd45712eaf6d196.tar.zst |
Fix profile hover card blocked state (#4480)
* Fix: mini profile on hover allows following a blocker/blocked user (#4423) (#4440) * Tweaks --------- Co-authored-by: Michał Gołda <michal.golda@hotmail.com>
Diffstat (limited to 'src/components/moderation')
-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} /> + )} </> ) } |