fix: follow by tab
This commit is contained in:
@ -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} />}
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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)}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user