import React from 'react' import {Pressable, StyleProp, ViewStyle} from 'react-native' import {useStores} from 'state/index' import {Link} from './Link' import {isWeb} from 'platform/detection' import {makeProfileLink} from 'lib/routes/links' interface UserPreviewLinkProps { did: string handle: string style?: StyleProp } export function UserPreviewLink( props: React.PropsWithChildren, ) { const store = useStores() if (isWeb) { return ( {props.children} ) } return ( store.shell.openModal({ name: 'profile-preview', did: props.did, }) } accessibilityRole="button" accessibilityLabel={props.handle} accessibilityHint="" style={props.style}> {props.children} ) }