fix: messages link
This commit is contained in:
@ -1,6 +1,8 @@
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { KieranPubKey } from "Const";
|
import { KieranPubKey } from "Const";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
import { TLVEntryType, encodeTLVEntries, NostrPrefix } from "@snort/system";
|
||||||
|
import { bech32ToHex } from "SnortUtils";
|
||||||
|
|
||||||
export default function HelpPage() {
|
export default function HelpPage() {
|
||||||
return (
|
return (
|
||||||
@ -12,7 +14,16 @@ export default function HelpPage() {
|
|||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="If you have an enquiry about your NIP-05 order please DM {link}"
|
defaultMessage="If you have an enquiry about your NIP-05 order please DM {link}"
|
||||||
values={{
|
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>
|
</p>
|
||||||
|
@ -2,7 +2,15 @@ import "./ProfilePage.css";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useIntl, FormattedMessage } from "react-intl";
|
import { useIntl, FormattedMessage } from "react-intl";
|
||||||
import { useNavigate, useParams } from "react-router-dom";
|
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 { LNURL } from "@snort/shared";
|
||||||
import { useUserProfile } from "@snort/system-react";
|
import { useUserProfile } from "@snort/system-react";
|
||||||
|
|
||||||
@ -325,7 +333,16 @@ export default function ProfilePage() {
|
|||||||
)}
|
)}
|
||||||
{loginPubKey && (
|
{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} />
|
<Icon name="envelope" size={16} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</>
|
</>
|
||||||
|
Reference in New Issue
Block a user