diff options
author | Hailey <me@haileyok.com> | 2024-05-16 08:17:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 08:17:34 -0700 |
commit | b635d000b51a440b3c0eb8a2c0c01cf8e8c54ed3 (patch) | |
tree | f69e4d059c698479ad9fb1f4b80ee8490e91fd1b /src/view/com/util/UserAvatar.tsx | |
parent | 9499d4343db3107ef97243894d7310e3de3daa60 (diff) | |
download | voidsky-b635d000b51a440b3c0eb8a2c0c01cf8e8c54ed3.tar.zst |
[🐴] Disable hover card when blocked or blocking (#4041)
Diffstat (limited to 'src/view/com/util/UserAvatar.tsx')
-rw-r--r-- | src/view/com/util/UserAvatar.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index 83c61a4f2..19e2cf880 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -50,8 +50,9 @@ interface EditableUserAvatarProps extends BaseUserAvatarProps { interface PreviewableUserAvatarProps extends BaseUserAvatarProps { moderation?: ModerationUI - onBeforePress?: () => void profile: AppBskyActorDefs.ProfileViewBasic + disable?: boolean + onBeforePress?: () => void } const BLUR_AMOUNT = isWeb ? 5 : 100 @@ -383,6 +384,7 @@ export {EditableUserAvatar} let PreviewableUserAvatar = ({ moderation, profile, + disable, onBeforePress, ...rest }: PreviewableUserAvatarProps): React.ReactNode => { @@ -395,7 +397,7 @@ let PreviewableUserAvatar = ({ }, [profile, queryClient, onBeforePress]) return ( - <ProfileHoverCard did={profile.did}> + <ProfileHoverCard did={profile.did} disable={disable}> <Link label={_(msg`See profile`)} to={makeProfileLink({ |