diff options
author | Sebastian <sebasjm@gmail.com> | 2023-12-06 14:05:18 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-12-06 14:10:10 -0300 |
commit | 71acfc274c9cfef70d9c2ed542958434ac94b137 (patch) | |
tree | fcfbd5b38934bf946af9252a2a03efbc2aff69ad /packages/web-util | |
parent | f576bf0eb1c4643356683dfbc4f882dcc670d295 (diff) | |
download | wallet-core-71acfc274c9cfef70d9c2ed542958434ac94b137.tar.xz |
testing key
Diffstat (limited to 'packages/web-util')
-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(); }} > |