diff --git a/src/components/dms/MessageProfileButton.tsx b/src/components/dms/MessageProfileButton.tsx index 38e28722fb..7c0c5612fd 100644 --- a/src/components/dms/MessageProfileButton.tsx +++ b/src/components/dms/MessageProfileButton.tsx @@ -1,44 +1,36 @@ -import React, {useCallback} from 'react' +import React from 'react' import {AppBskyActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' import {useMaybeConvoForUser} from '#/state/queries/messages/get-convo-for-members' -import {useTheme} from '#/alf' -import {Envelope_Stroke2_Corner0_Rounded as Envelope} from '#/components/icons/Envelope' -import {Button} from '../Button' +import {atoms as a, useTheme} from '#/alf' +import {Message_Stroke2_Corner0_Rounded as Message} from '../icons/Message' +import {Link} from '../Link' export function MessageProfileButton({ profile, }: { profile: AppBskyActorDefs.ProfileView }) { - const navigation = useNavigation() const {_} = useLingui() const t = useTheme() const {data: convoId} = useMaybeConvoForUser(profile.did) - const onPressDm = useCallback(() => { - if (!convoId) return - navigation.navigate('MessagesConversation', {conversation: convoId}) - }, [navigation, convoId]) - if (!convoId) return null return ( - + to={`/messages/${convoId}`} + style={[a.justify_center, {width: 36, height: 36}]}> + + ) }