From 9e6de65d1d093df337bd038cf7e31723a530f84b Mon Sep 17 00:00:00 2001 From: tjayrush Date: Mon, 9 Jan 2023 14:21:44 -0500 Subject: [PATCH] Getting help link to work --- src/ui/components/SidePanels/HelpPanel.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ui/components/SidePanels/HelpPanel.tsx b/src/ui/components/SidePanels/HelpPanel.tsx index ae53c2fa..b102018f 100644 --- a/src/ui/components/SidePanels/HelpPanel.tsx +++ b/src/ui/components/SidePanels/HelpPanel.tsx @@ -16,11 +16,15 @@ export const HelpPanel = () => { const url = useMemo( () => { - if (!matchedRoute) { return 'https://docs.trueblocks.io/'; } - const parts = `docs/explorer${matchedRoute.path}`.split('/'); + const ret = 'https://trueblocks.io/explorer/'; + if (!matchedRoute) { return ret; } + const parts = `${matchedRoute.path}`.split('/'); const tag = parts.pop(); + let rr = String(new URL(`${parts.join('/')}#${tag}`, ret)); + rr = rr.replace('https://trueblocks.io/explorer/#', 'https://trueblocks.io/'); + rr = rr.replace('https://trueblocks.io/', 'https://trueblocks.io/explorer/'); return ( - String(new URL(`${parts.join('/')}#${tag}`, 'https://docs.trueblocks.io/')) + rr ); }, [matchedRoute],