Feed feedback and fixes #231

Merged
enes merged 22 commits from feat/131-feed-issues into staging 2025-02-21 14:06:33 +00:00
Showing only changes of commit 01ca102dcc - Show all commits

View File

@ -587,18 +587,17 @@ type ProfileLinkProps = {
} }
export const ProfileLink = ({ pubkey, nip05 }: ProfileLinkProps) => { export const ProfileLink = ({ pubkey, nip05 }: ProfileLinkProps) => {
const { ndk } = useNDKContext() const { ndk } = useNDKContext()
console.log(`[debug]`, pubkey, nip05)
const [hexPubkey, setHexPubkey] = useState<string>() const [hexPubkey, setHexPubkey] = useState<string>()
const profile = useProfile(hexPubkey, { const profile = useProfile(hexPubkey, {
cacheUsage: NDKSubscriptionCacheUsage.PARALLEL cacheUsage: NDKSubscriptionCacheUsage.PARALLEL
}) })
useEffect(() => { useEffect(() => {
if (pubkey) { if (pubkey) {
setHexPubkey(pubkey) setHexPubkey(npubToHex(pubkey)!)
} else if (nip05) { } else if (nip05) {
NDKUser.fromNip05(nip05, ndk).then((user) => { NDKUser.fromNip05(nip05, ndk).then((user) => {
if (user?.pubkey) { if (user?.pubkey) {
setHexPubkey(user.pubkey) setHexPubkey(npubToHex(user.pubkey)!)
} }
}) })
} }