Make whole verifier clickable, no nested interactives
This commit is contained in:
@@ -16,7 +16,7 @@ import {useProfileShadow} from '#/state/cache/profile-shadow'
|
|||||||
import {useProfileFollowMutationQueue} from '#/state/queries/profile'
|
import {useProfileFollowMutationQueue} from '#/state/queries/profile'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
|
import {PreviewableUserAvatar, UserAvatar} from '#/view/com/util/UserAvatar'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -130,17 +130,29 @@ export function Link({
|
|||||||
export function Avatar({
|
export function Avatar({
|
||||||
profile,
|
profile,
|
||||||
moderationOpts,
|
moderationOpts,
|
||||||
|
onPress,
|
||||||
|
disabledPreview,
|
||||||
}: {
|
}: {
|
||||||
profile: bsky.profile.AnyProfileView
|
profile: bsky.profile.AnyProfileView
|
||||||
moderationOpts: ModerationOpts
|
moderationOpts: ModerationOpts
|
||||||
|
onPress?: () => void
|
||||||
|
disabledPreview?: boolean
|
||||||
}) {
|
}) {
|
||||||
const moderation = moderateProfile(profile, moderationOpts)
|
const moderation = moderateProfile(profile, moderationOpts)
|
||||||
|
|
||||||
return (
|
return disabledPreview ? (
|
||||||
|
<UserAvatar
|
||||||
|
size={40}
|
||||||
|
avatar={profile.avatar}
|
||||||
|
type={profile.associated?.labeler ? 'labeler' : 'user'}
|
||||||
|
moderation={moderation.ui('avatar')}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
<PreviewableUserAvatar
|
<PreviewableUserAvatar
|
||||||
size={40}
|
size={40}
|
||||||
profile={profile}
|
profile={profile}
|
||||||
moderation={moderation.ui('avatar')}
|
moderation={moderation.ui('avatar')}
|
||||||
|
onBeforePress={onPress}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,14 +213,22 @@ function VerifierCard({
|
|||||||
</>
|
</>
|
||||||
) : profile && moderationOpts ? (
|
) : profile && moderationOpts ? (
|
||||||
<>
|
<>
|
||||||
<ProfileCard.Avatar
|
<ProfileCard.Link
|
||||||
profile={profile}
|
profile={profile}
|
||||||
moderationOpts={moderationOpts}
|
style={[a.flex_row, a.align_center, a.gap_sm, a.flex_1]}
|
||||||
/>
|
onPress={() => {
|
||||||
<ProfileCard.NameAndHandle
|
outerDialogControl.close()
|
||||||
profile={profile}
|
}}>
|
||||||
moderationOpts={moderationOpts}
|
<ProfileCard.Avatar
|
||||||
/>
|
profile={profile}
|
||||||
|
moderationOpts={moderationOpts}
|
||||||
|
disabledPreview
|
||||||
|
/>
|
||||||
|
<ProfileCard.NameAndHandle
|
||||||
|
profile={profile}
|
||||||
|
moderationOpts={moderationOpts}
|
||||||
|
/>
|
||||||
|
</ProfileCard.Link>
|
||||||
{canAdminister && (
|
{canAdminister && (
|
||||||
<View>
|
<View>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user