chore: tweak follows you

This commit is contained in:
Kieran 2023-01-18 16:13:38 +00:00
parent ac8d3373cf
commit b76fc97929
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 6 additions and 13 deletions

View File

@ -21,7 +21,7 @@ export default function FollowsYou({ pubkey }: FollowsYouProps ) {
return ( return (
<> <>
{ followsMe ? <div className="copy"><span className="body">follows you</span></div> : null } { followsMe ? <span className="pill">follows you</span> : null }
</> </>
) )
} }

View File

@ -20,7 +20,7 @@ import FollowersList from "../element/FollowersList";
import FollowsList from "../element/FollowsList"; import FollowsList from "../element/FollowsList";
import { RootState } from "../state/Store"; import { RootState } from "../state/Store";
import { HexKey } from "../nostr"; import { HexKey } from "../nostr";
import FollowsYou from "../element/FollowsYou" import FollowsYou from "../element/FollowsYou"
enum ProfileTab { enum ProfileTab {
Notes = "Notes", Notes = "Notes",
@ -51,18 +51,11 @@ export default function ProfilePage() {
<h2>{user?.display_name || user?.name || 'Nostrich'}</h2> <h2>{user?.display_name || user?.name || 'Nostrich'}</h2>
<Copy text={params.id || ""} /> <Copy text={params.id || ""} />
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />} {user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
{ followsYou() } <FollowsYou pubkey={id} />
</div> </div>
) )
} }
function followsYou(){
return (
<div className="flex">
<div className="f-grow">{ <FollowsYou pubkey={id}/> }</div>
</div>
)
}
function bio() { function bio() {
const lnurl = extractLnAddress(user?.lud16 || user?.lud06 || ""); const lnurl = extractLnAddress(user?.lud16 || user?.lud06 || "");
return ( return (
@ -93,7 +86,7 @@ export default function ProfilePage() {
function tabContent() { function tabContent() {
switch (tab) { switch (tab) {
case ProfileTab.Notes: case ProfileTab.Notes:
return <Timeline key={id} pubkeys={[id]} global={false} postsOnly={false} method={"LIMIT_UNTIL"} />; return <Timeline key={id} pubkeys={[id]} global={false} postsOnly={false} method={"LIMIT_UNTIL"} />;
case ProfileTab.Follows: { case ProfileTab.Follows: {
if (isMe) { if (isMe) {
return ( return (
@ -115,7 +108,7 @@ export default function ProfilePage() {
function avatar() { function avatar() {
return ( return (
<div className="avatar-wrapper"> <div className="avatar-wrapper">
<Avatar user={user} /> <Avatar user={user} />
</div> </div>
) )
} }