fix(profile): convert page id to npub bech32
This commit is contained in:
parent
3b68153105
commit
f698806b82
@ -75,6 +75,8 @@ export default function ProfilePage() {
|
|||||||
users: new Map(),
|
users: new Map(),
|
||||||
creator: "",
|
creator: "",
|
||||||
});
|
});
|
||||||
|
const npub = !id.startsWith("npub") ? hexToBech32("npub", id || undefined) : id;
|
||||||
|
|
||||||
const lnurl = extractLnAddress(user?.lud16 || user?.lud06 || "");
|
const lnurl = extractLnAddress(user?.lud16 || user?.lud06 || "");
|
||||||
const website_url =
|
const website_url =
|
||||||
user?.website && !user.website.startsWith("http") ? "https://" + user.website : user?.website || "";
|
user?.website && !user.website.startsWith("http") ? "https://" + user.website : user?.website || "";
|
||||||
@ -121,7 +123,7 @@ export default function ProfilePage() {
|
|||||||
<FollowsYou followsMe={follows.includes(id)} />
|
<FollowsYou followsMe={follows.includes(id)} />
|
||||||
</h2>
|
</h2>
|
||||||
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
|
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
|
||||||
<Copy text={params.id || ""} />
|
<Copy text={npub} />
|
||||||
{links()}
|
{links()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user