diff options
-rw-r--r-- | packages/web-util/src/components/Footer.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/web-util/src/components/Footer.tsx b/packages/web-util/src/components/Footer.tsx index 8fdf6b8f0..58dd2a60a 100644 --- a/packages/web-util/src/components/Footer.tsx +++ b/packages/web-util/src/components/Footer.tsx @@ -1,8 +1,12 @@ import { useTranslationContext } from "../index.browser.js"; import { h } from "preact"; -export function Footer({ testingUrl, VERSION, GIT_HASH }: { VERSION?: string, GIT_HASH?: string, testingUrl?: string }) { +export function Footer({ testingUrlKey, VERSION, GIT_HASH }: { VERSION?: string, GIT_HASH?: string, testingUrlKey?: string }) { const { i18n } = useTranslationContext() + + const testingUrl = (testingUrlKey && typeof localStorage !== "undefined") && localStorage.getItem(testingUrlKey) ? + localStorage.getItem(testingUrlKey) ?? undefined : + undefined const versionText = VERSION ? GIT_HASH ? <a href={`https://git.taler.net/wallet-core.git/tree/?id=${GIT_HASH}`} target="_blank" rel="noreferrer noopener"> @@ -23,7 +27,7 @@ export function Footer({ testingUrl, VERSION, GIT_HASH }: { VERSION?: string, GI <p class="text-xs leading-5 text-gray-400"> Copyright © 2014—2023 Taler Systems SA. {versionText}{" "} </p> - {testingUrl && + {testingUrlKey && testingUrl && <p class="text-xs leading-5 text-gray-300"> Testing with {testingUrl}{" "} @@ -31,7 +35,7 @@ export function Footer({ testingUrl, VERSION, GIT_HASH }: { VERSION?: string, GI href="" onClick={(e) => { e.preventDefault(); - localStorage.removeItem("bank-base-url"); + localStorage.removeItem(testingUrlKey); window.location.reload(); }} > |