From dd2292f8d0e1c9a477e83bcb81de0255e3b977e0 Mon Sep 17 00:00:00 2001 From: Felix <51097237+f321x@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:57:38 +0000 Subject: [PATCH] Use amboss.space onion link in Stats (#859) after pre-commit cleanup --- frontend/src/components/Dialogs/Stats.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/Dialogs/Stats.tsx b/frontend/src/components/Dialogs/Stats.tsx index 6f796e3a..2fbaf2e8 100644 --- a/frontend/src/components/Dialogs/Stats.tsx +++ b/frontend/src/components/Dialogs/Stats.tsx @@ -36,6 +36,12 @@ interface Props { const StatsDialog = ({ open = false, onClose, info }: Props): JSX.Element => { const { t } = useTranslation(); + const isOnionAccess = window.location.hostname.endsWith('.onion'); + + const ambossURL = isOnionAccess + ? `http://amboss5jfdzzblty5dr5zaig5twvkgsla6y5xuy6s5c5ogpjfcqgltid.onion/node/${info.node_id}` + : `https://amboss.space/node/${info.node_id}`; + return (
@@ -107,11 +113,7 @@ const StatsDialog = ({ open = false, onClose, info }: Props): JSX.Element => { - + {`${info.node_id.slice(0, 12)}... (AMBOSS)`}