import { useQuery } from '@tanstack/react-query'; import { LoaderIcon } from '@shared/icons'; import { compactNumber } from '@utils/number'; export function UserStats({ pubkey }: { pubkey: string }) { const { status, data } = useQuery(['user-metadata', pubkey], async () => { const res = await fetch(`https://api.nostr.band/v0/stats/profile/${pubkey}`); if (!res.ok) { throw new Error('Error'); } return await res.json(); }); if (status === 'loading') { return (