import { Image } from "@shared/image"; import { DEFAULT_AVATAR } from "@stores/constants"; import { useProfile } from "@utils/hooks/useProfile"; import { shortenKey } from "@utils/shortenKey"; import { nip19 } from "nostr-tools"; import { useNavigate } from "react-router-dom"; export function ChatSidebar({ pubkey }: { pubkey: string }) { const navigate = useNavigate(); const { user } = useProfile(pubkey); const viewProfile = () => { const pubkey = nip19.decode(user.npub).data; navigate(`/app/user/${pubkey}`); }; return (
{pubkey}

{user?.displayName || user?.name}

{user?.nip05 || shortenKey(pubkey)}

{user?.bio || user?.about}

); }