forked from Kieran/snort
notif and qr profile link prefixes from config
This commit is contained in:
parent
1f82d38acb
commit
d704ded3d8
@ -83,7 +83,9 @@ export default function NotificationsPage({ onClick }: { onClick?: (link: NostrL
|
|||||||
|
|
||||||
const timeGrouped = useMemo(() => {
|
const timeGrouped = useMemo(() => {
|
||||||
return myNotifications.reduce((acc, v) => {
|
return myNotifications.reduce((acc, v) => {
|
||||||
const key = `${timeKey(v)}:${notificationContext(v as TaggedNostrEvent)?.encode()}:${v.kind}`;
|
const key = `${timeKey(v)}:${notificationContext(v as TaggedNostrEvent)?.encode(CONFIG.eventLinkPrefix)}:${
|
||||||
|
v.kind
|
||||||
|
}`;
|
||||||
if (acc.has(key)) {
|
if (acc.has(key)) {
|
||||||
unwrap(acc.get(key)).push(v as TaggedNostrEvent);
|
unwrap(acc.get(key)).push(v as TaggedNostrEvent);
|
||||||
} else {
|
} else {
|
||||||
@ -240,7 +242,7 @@ function NotificationGroup({ evs, onClick }: { evs: Array<TaggedNostrEvent>; onC
|
|||||||
if (onClick) {
|
if (onClick) {
|
||||||
onClick(context);
|
onClick(context);
|
||||||
} else {
|
} else {
|
||||||
navigate(`/${context.encode()}`);
|
navigate(`/${context.encode(CONFIG.eventLinkPrefix)}`);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -299,7 +299,7 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) {
|
|||||||
function renderIcons() {
|
function renderIcons() {
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
|
|
||||||
const link = encodeTLV(NostrPrefix.Profile, id);
|
const link = encodeTLV(CONFIG.profileLinkPrefix, id);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IconButton onClick={() => setShowProfileQr(true)} icon={{ name: "qr", size: 16 }} />
|
<IconButton onClick={() => setShowProfileQr(true)} icon={{ name: "qr", size: 16 }} />
|
||||||
|
Loading…
Reference in New Issue
Block a user