mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-03 02:10:55 +00:00
Add user stats to user recomendations in edit box
This commit is contained in:
parent
487fce7432
commit
bcc1fc57a3
@ -38,6 +38,7 @@ import { useMediaContext } from "../../../contexts/MediaContext";
|
||||
import { hookForDev } from "../../../lib/devTools";
|
||||
import ButtonPrimary from "../../Buttons/ButtonPrimary";
|
||||
import ButtonSecondary from "../../Buttons/ButtonSecondary";
|
||||
import { useProfileContext } from "../../../contexts/ProfileContext";
|
||||
|
||||
type AutoSizedTextArea = HTMLTextAreaElement & { _baseScrollHeight: number };
|
||||
|
||||
@ -58,6 +59,7 @@ const EditBox: Component<{
|
||||
const search = useSearchContext();
|
||||
const account = useAccountContext();
|
||||
const toast = useToastContext();
|
||||
const profile = useProfileContext();
|
||||
|
||||
let textArea: HTMLTextAreaElement | undefined;
|
||||
let textPreview: HTMLDivElement | undefined;
|
||||
@ -1212,7 +1214,7 @@ const EditBox: Component<{
|
||||
title={userName(user)}
|
||||
description={nip05Verification(user)}
|
||||
icon={<Avatar user={user} size="xs" />}
|
||||
statNumber={search?.scores[user.pubkey]}
|
||||
statNumber={profile?.profileHistory.stats[user.pubkey]?.followers_count || search?.scores[user.pubkey]}
|
||||
statLabel={intl.formatMessage(tSearch.followers)}
|
||||
onClick={() => selectUser(user)}
|
||||
highlighted={highlightedUser() === index()}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { A } from "@solidjs/router";
|
||||
import { Component, createSignal, JSXElement, onMount, Show } from "solid-js";
|
||||
import { Component, JSXElement } from "solid-js";
|
||||
import { hookForDev } from "../../../lib/devTools";
|
||||
import { nip05Verification, userName } from "../../../stores/profile";
|
||||
import { PrimalUser } from "../../../types/primal";
|
||||
@ -35,18 +35,18 @@ const MentionedUserLink: Component<{
|
||||
return (
|
||||
<LinkComponent>
|
||||
@{userName(props.user)}
|
||||
<div class={styles.userPreview}>
|
||||
<Avatar user={props.user} />
|
||||
<div>
|
||||
<div class={styles.userName}>
|
||||
{userName(props.user)}
|
||||
<VerificationCheck user={props.user} />
|
||||
</div>
|
||||
<div class={styles.verification}>
|
||||
{nip05Verification(props.user)}
|
||||
</div>
|
||||
<div class={styles.userPreview}>
|
||||
<Avatar user={props.user} />
|
||||
<div>
|
||||
<div class={styles.userName}>
|
||||
{userName(props.user)}
|
||||
<VerificationCheck user={props.user} />
|
||||
</div>
|
||||
<div class={styles.verification}>
|
||||
{nip05Verification(props.user)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</LinkComponent>
|
||||
);
|
||||
}
|
||||
|
@ -1014,7 +1014,7 @@ const Messages: Component = () => {
|
||||
title={userName(user)}
|
||||
description={user.nip05}
|
||||
icon={<Avatar user={user} size="xs" />}
|
||||
statNumber={search?.scores[user.pubkey]}
|
||||
statNumber={profile?.profileHistory.stats[user.pubkey]?.followers_count || search?.scores[user.pubkey]}
|
||||
statLabel={intl.formatMessage(tSearch.followers)}
|
||||
onClick={() => selectUser(user)}
|
||||
highlighted={highlightedUser() === index()}
|
||||
|
Loading…
Reference in New Issue
Block a user