import { ImageWithFallback } from '@components/imageWithFallback'; import { DEFAULT_AVATAR } from '@stores/constants'; import { truncate } from '@utils/truncate'; import { useCallback, useEffect, useState } from 'react'; export const UserFollow = ({ pubkey }: { pubkey: string }) => { const [profile, setProfile] = useState(null); const getCachedMetadata = useCallback(async () => { const { getFollowByPubkey } = await import('@utils/bindings'); getFollowByPubkey({ pubkey: pubkey }) .then((res) => { if (res) { const metadata = JSON.parse(res.metadata); setProfile(metadata); } }) .catch(console.error); }, [pubkey]); useEffect(() => { getCachedMetadata().catch(console.error); }, [getCachedMetadata]); return (