import "./ProfileImage.css"; import { useMemo } from "react"; import { Link, useNavigate } from "react-router-dom"; import { useUserProfile } from "Feed/ProfileFeed"; import { hexToBech32, profileLink } from "Util"; import Avatar from "Element/Avatar"; import Nip05 from "Element/Nip05"; import { HexKey } from "Nostr"; import { MetadataCache } from "State/Users"; export interface ProfileImageProps { pubkey: HexKey; subHeader?: JSX.Element; showUsername?: boolean; className?: string; link?: string; } export default function ProfileImage({ pubkey, subHeader, showUsername = true, className, link, }: ProfileImageProps) { const navigate = useNavigate(); const user = useUserProfile(pubkey); const name = useMemo(() => { return getDisplayName(user, pubkey); }, [user, pubkey]); return (