import * as Avatar from '@radix-ui/react-avatar'; import { minidenticon } from 'minidenticons'; import { Link } from 'react-router-dom'; import { useStorage } from '@libs/storage/provider'; import { EditIcon, LoaderIcon } from '@shared/icons'; import { useProfile } from '@utils/hooks/useProfile'; import { displayNpub } from '@utils/shortenKey'; export function ProfileCard() { const { db } = useStorage(); const { status, user } = useProfile(db.account.pubkey); const svgURI = 'data:image/svg+xml;utf8,' + encodeURIComponent(minidenticon(db.account.pubkey, 90, 50)); return (
{user.nip05 || displayNpub(db.account.pubkey, 16)}