Add DM button to labeller profiles (#11149)
This commit is contained in:
@@ -25,6 +25,7 @@ import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
|
||||
import {atoms as a, tokens, useTheme} from '#/alf'
|
||||
import {Button, ButtonText} from '#/components/Button'
|
||||
import {type DialogOuterProps, useDialogControl} from '#/components/Dialog'
|
||||
import {MessageProfileButton} from '#/components/dms/MessageProfileButton'
|
||||
import {
|
||||
Heart2_Filled_Stroke2_Corner0_Rounded as HeartFilled,
|
||||
Heart2_Stroke2_Corner0_Rounded as Heart,
|
||||
@@ -240,7 +241,7 @@ export function HeaderLabelerButtons({
|
||||
const t = useTheme()
|
||||
const ax = useAnalytics()
|
||||
const {_} = useLingui()
|
||||
const {currentAccount} = useSession()
|
||||
const {currentAccount, hasSession} = useSession()
|
||||
const requireAuth = useRequireAuth()
|
||||
const playHaptic = useHaptics()
|
||||
const editProfileControl = useDialogControl()
|
||||
@@ -286,6 +287,11 @@ export function HeaderLabelerButtons({
|
||||
})
|
||||
return (
|
||||
<>
|
||||
{hasSession &&
|
||||
!isMe &&
|
||||
!profile.viewer?.blockedBy &&
|
||||
!profile.viewer?.blocking && <MessageProfileButton profile={profile} />}
|
||||
|
||||
{isMe ? (
|
||||
<>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user