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 ( return (
<span className="highlight" onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}> <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} /> @<DisplayName user={profile} pubkey={link.id} />
</ProfileLink> </ProfileLink>
{isHovering && <ProfileCard pubkey={link.id} user={profile} show={true} />} {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 wot = useWoT();
const followDistance = wot.followDistance(pubkey); const followDistance = wot.followDistance(pubkey);
const { followedByFriendsArray, totalFollowedByFriends } = useMemo(() => { const { followedByFriendsArray, totalFollowedByFriends } = useMemo(() => {
const followedByFriends = wot.followedByCount(pubkey); const followedByFriends = wot.followedBy(pubkey);
return { return {
followedByFriendsArray: Array.from(followedByFriends).slice(0, MAX_FOLLOWED_BY_FRIENDS), followedByFriendsArray: Array.from(followedByFriends).slice(0, MAX_FOLLOWED_BY_FRIENDS),
totalFollowedByFriends: followedByFriends.size, totalFollowedByFriends: followedByFriends.size,

View File

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

View File

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