From 033ef5e995402a619a0d7dc037e23248cbddde04 Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 23 Oct 2025 00:54:29 +0200 Subject: [PATCH] fix: relay article link now opens via /a/ path instead of /r/ Updated handleLinkClick in PWASettings to check if URL is an internal route (starts with /) and navigate directly, otherwise wrap external URLs with /r/ path. This fixes the third relay education link to open the nostr article correctly. --- src/components/Settings/PWASettings.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Settings/PWASettings.tsx b/src/components/Settings/PWASettings.tsx index e12e5e2e..949ed577 100644 --- a/src/components/Settings/PWASettings.tsx +++ b/src/components/Settings/PWASettings.tsx @@ -33,7 +33,13 @@ const PWASettings: React.FC = ({ settings, onUpdate, onClose } const handleLinkClick = (url: string) => { if (onClose) onClose() - navigate(`/r/${encodeURIComponent(url)}`) + // If it's an internal route (starts with /), navigate directly + if (url.startsWith('/')) { + navigate(url) + } else { + // External URL: wrap with /r/ path + navigate(`/r/${encodeURIComponent(url)}`) + } } const handleClearCache = async () => {