import {useCallback} from 'react' import {View} from 'react-native' import {type AppBskyActorDefs, type ModerationOpts} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useQueryClient} from '@tanstack/react-query' import {makeProfileLink} from '#/lib/routes/links' import {unstableCacheProfileView} from '#/state/queries/unstable-profile-cache' import {atoms as a, useTheme} from '#/alf' import {Link} from '#/components/Link' import * as ProfileCard from '#/components/ProfileCard' export function SearchProfileCard({ profile, moderationOpts, onPress: onPressInner, }: { profile: AppBskyActorDefs.ProfileViewBasic moderationOpts: ModerationOpts onPress?: () => void }) { const t = useTheme() const {_} = useLingui() const qc = useQueryClient() const onPress = useCallback(() => { unstableCacheProfileView(qc, profile) onPressInner?.() }, [qc, profile, onPressInner]) return ( {({hovered, pressed}) => ( )} ) }