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>
This commit is contained in:
parent
d989128e5b
commit
28ba99917a
2 changed files with 65 additions and 27 deletions
|
@ -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} />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue