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