From d704ded3d8a60ce70389d0268fa77b00b75bc93a Mon Sep 17 00:00:00 2001 From: Martti Malmi Date: Wed, 29 Nov 2023 15:26:44 +0200 Subject: [PATCH] notif and qr profile link prefixes from config --- packages/app/src/Pages/Notifications/Notifications.tsx | 6 ++++-- packages/app/src/Pages/Profile/ProfilePage.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/app/src/Pages/Notifications/Notifications.tsx b/packages/app/src/Pages/Notifications/Notifications.tsx index 0e6be0b0..728e0af0 100644 --- a/packages/app/src/Pages/Notifications/Notifications.tsx +++ b/packages/app/src/Pages/Notifications/Notifications.tsx @@ -83,7 +83,9 @@ export default function NotificationsPage({ onClick }: { onClick?: (link: NostrL const timeGrouped = useMemo(() => { 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)) { unwrap(acc.get(key)).push(v as TaggedNostrEvent); } else { @@ -240,7 +242,7 @@ function NotificationGroup({ evs, onClick }: { evs: Array; onC if (onClick) { onClick(context); } else { - navigate(`/${context.encode()}`); + navigate(`/${context.encode(CONFIG.eventLinkPrefix)}`); } }} /> diff --git a/packages/app/src/Pages/Profile/ProfilePage.tsx b/packages/app/src/Pages/Profile/ProfilePage.tsx index 40554a72..96684ca3 100644 --- a/packages/app/src/Pages/Profile/ProfilePage.tsx +++ b/packages/app/src/Pages/Profile/ProfilePage.tsx @@ -299,7 +299,7 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) { function renderIcons() { if (!id) return; - const link = encodeTLV(NostrPrefix.Profile, id); + const link = encodeTLV(CONFIG.profileLinkPrefix, id); return ( <> setShowProfileQr(true)} icon={{ name: "qr", size: 16 }} />