bug: follows you
This commit is contained in:
parent
40bd552994
commit
70db025ed2
@ -19,10 +19,12 @@ export default function useFollowsFeed(pubkey: HexKey) {
|
||||
}, [isMe, pubkey]);
|
||||
|
||||
const contactFeed = useSubscription(sub, { leaveOpen: false, cache: true });
|
||||
const following = useMemo(() => {
|
||||
return useMemo(() => {
|
||||
if (isMe) {
|
||||
return follows;
|
||||
}
|
||||
return getFollowing(contactFeed.store.notes ?? [], pubkey);
|
||||
}, [contactFeed.store.notes]);
|
||||
return isMe ? follows : following;
|
||||
}, [contactFeed.store, follows]);
|
||||
}
|
||||
|
||||
export function getFollowing(notes: TaggedRawEvent[], pubkey: HexKey) {
|
||||
|
@ -120,7 +120,7 @@ export default function ProfilePage() {
|
||||
<div className="name">
|
||||
<h2>
|
||||
{user?.display_name || user?.name || "Nostrich"}
|
||||
<FollowsYou followsMe={follows.includes(id)} />
|
||||
<FollowsYou followsMe={follows.includes(loginPubKey ?? "")} />
|
||||
</h2>
|
||||
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
|
||||
<Copy text={npub} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user