fix: messages link
This commit is contained in:
parent
f6a46e3523
commit
3b11f63573
@ -1,6 +1,8 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { KieranPubKey } from "Const";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { TLVEntryType, encodeTLVEntries, NostrPrefix } from "@snort/system";
|
||||
import { bech32ToHex } from "SnortUtils";
|
||||
|
||||
export default function HelpPage() {
|
||||
return (
|
||||
@ -12,7 +14,16 @@ export default function HelpPage() {
|
||||
<FormattedMessage
|
||||
defaultMessage="If you have an enquiry about your NIP-05 order please DM {link}"
|
||||
values={{
|
||||
link: <Link to={`/messages/${KieranPubKey}`}>Kieran</Link>,
|
||||
link: (
|
||||
<Link
|
||||
to={`/messages/${encodeTLVEntries("chat4" as NostrPrefix, {
|
||||
type: TLVEntryType.Author,
|
||||
length: 64,
|
||||
value: bech32ToHex(KieranPubKey),
|
||||
})}`}>
|
||||
Kieran
|
||||
</Link>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
|
@ -2,7 +2,15 @@ import "./ProfilePage.css";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useIntl, FormattedMessage } from "react-intl";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { encodeTLV, EventKind, HexKey, NostrPrefix, tryParseNostrLink } from "@snort/system";
|
||||
import {
|
||||
encodeTLV,
|
||||
encodeTLVEntries,
|
||||
EventKind,
|
||||
HexKey,
|
||||
NostrPrefix,
|
||||
TLVEntryType,
|
||||
tryParseNostrLink,
|
||||
} from "@snort/system";
|
||||
import { LNURL } from "@snort/shared";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
@ -325,7 +333,16 @@ export default function ProfilePage() {
|
||||
)}
|
||||
{loginPubKey && (
|
||||
<>
|
||||
<IconButton onClick={() => navigate(`/messages/${hexToBech32(NostrPrefix.PublicKey, id)}`)}>
|
||||
<IconButton
|
||||
onClick={() =>
|
||||
navigate(
|
||||
`/messages/${encodeTLVEntries("chat4" as NostrPrefix, {
|
||||
type: TLVEntryType.Author,
|
||||
length: 64,
|
||||
value: id,
|
||||
})}`
|
||||
)
|
||||
}>
|
||||
<Icon name="envelope" size={16} />
|
||||
</IconButton>
|
||||
</>
|
||||
|
Loading…
x
Reference in New Issue
Block a user