taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 71acfc274c9cfef70d9c2ed542958434ac94b137
parent f576bf0eb1c4643356683dfbc4f882dcc670d295
Author: Sebastian <sebasjm@gmail.com>
Date:   Wed,  6 Dec 2023 14:05:18 -0300

testing key

Diffstat:
Mpackages/web-util/src/components/Footer.tsx | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 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 &copy; 2014&mdash;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(); }} >