diff options
Diffstat (limited to 'src/view/com/util/UserPreviewLink.tsx')
-rw-r--r-- | src/view/com/util/UserPreviewLink.tsx | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/src/view/com/util/UserPreviewLink.tsx b/src/view/com/util/UserPreviewLink.tsx index 2f257bb5e..a2c46afc0 100644 --- a/src/view/com/util/UserPreviewLink.tsx +++ b/src/view/com/util/UserPreviewLink.tsx @@ -1,9 +1,8 @@ import React from 'react' -import {Pressable, StyleProp, ViewStyle} from 'react-native' +import {StyleProp, ViewStyle} from 'react-native' import {Link} from './Link' -import {isAndroid, isWeb} from 'platform/detection' +import {isWeb} from 'platform/detection' import {makeProfileLink} from 'lib/routes/links' -import {useModalControls} from '#/state/modals' import {usePrefetchProfileQuery} from '#/state/queries/profile' interface UserPreviewLinkProps { @@ -14,38 +13,19 @@ interface UserPreviewLinkProps { export function UserPreviewLink( props: React.PropsWithChildren<UserPreviewLinkProps>, ) { - const {openModal} = useModalControls() const prefetchProfileQuery = usePrefetchProfileQuery() - - if (isWeb || isAndroid) { - return ( - <Link - onPointerEnter={() => { - if (isWeb) { - prefetchProfileQuery(props.did) - } - }} - href={makeProfileLink(props)} - title={props.handle} - asAnchor - style={props.style}> - {props.children} - </Link> - ) - } return ( - <Pressable - onPress={() => - openModal({ - name: 'profile-preview', - did: props.did, - }) - } - accessibilityRole="button" - accessibilityLabel={props.handle} - accessibilityHint="" + <Link + onPointerEnter={() => { + if (isWeb) { + prefetchProfileQuery(props.did) + } + }} + href={makeProfileLink(props)} + title={props.handle} + asAnchor style={props.style}> {props.children} - </Pressable> + </Link> ) } |