fix: follow by tab

This commit is contained in:
2025-04-30 18:51:17 +01:00
parent d30aca46e8
commit fe4e17227e
4 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ export default function Mention({ link }: { link: NostrLink }) {
return (
<span className="highlight" onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
<ProfileLink pubkey={link.id} link={link} user={profile} onClick={e => e.stopPropagation()}>
<ProfileLink pubkey={link.id} user={profile} onClick={e => e.stopPropagation()}>
@<DisplayName user={profile} pubkey={link.id} />
</ProfileLink>
{isHovering && <ProfileCard pubkey={link.id} user={profile} show={true} />}

View File

@ -13,7 +13,7 @@ export default function FollowedBy({ pubkey }: { pubkey: HexKey }) {
const wot = useWoT();
const followDistance = wot.followDistance(pubkey);
const { followedByFriendsArray, totalFollowedByFriends } = useMemo(() => {
const followedByFriends = wot.followedByCount(pubkey);
const followedByFriends = wot.followedBy(pubkey);
return {
followedByFriendsArray: Array.from(followedByFriends).slice(0, MAX_FOLLOWED_BY_FRIENDS),
totalFollowedByFriends: followedByFriends.size,

View File

@ -74,8 +74,8 @@ export function FollowersTab({ id }: { id: HexKey }) {
const followers = useFollowersFeed(id);
return (
<FollowsList
pubkeys={followers}
className="p"
pubkeys={followers.map(a => a.pubkey)}
className="p flex flex-col gap-1"
profilePreviewProps={{
options: {
about: true,
@ -90,7 +90,7 @@ export function FollowsTab({ id }: { id: HexKey }) {
return (
<FollowsList
pubkeys={follows}
className="p"
className="p flex flex-col gap-1"
profilePreviewProps={{
options: {
about: true,

View File

@ -55,7 +55,7 @@ export class NostrLink implements ToNostrEventTag {
readonly marker?: string,
) {
if (type !== NostrPrefix.Address && !isHex(id)) {
throw new Error("ID must be hex");
throw new Error(`ID must be hex: ${JSON.stringify(id)}`);
}
}