import { ImageWithFallback } from '@components/imageWithFallback'; import { truncate } from '@utils/truncate'; import { DotsHorizontalIcon } from '@radix-ui/react-icons'; import Avatar from 'boring-avatars'; import { memo, useEffect, useState } from 'react'; export const UserWithUsername = memo(function UserWithUsername({ pubkey }: { pubkey: string }) { const [profile, setProfile] = useState({ picture: null, name: null, username: null }); useEffect(() => { fetch(`https://rbr.bio/${pubkey}/metadata.json`).then((res) => res.json().then((res) => { // update state setProfile(JSON.parse(res.content)); }) ); }, [pubkey]); return (