From bf3e99ea27ef7321a05a7a0a422ab9d1a48d52a3 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 10 Jul 2023 09:43:27 -0300
Subject: show testing tag

---
 packages/demobank-ui/src/pages/BankFrame.tsx | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

(limited to 'packages/demobank-ui/src/pages/BankFrame.tsx')

diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx b/packages/demobank-ui/src/pages/BankFrame.tsx
index babc4b867..c7168ac6d 100644
--- a/packages/demobank-ui/src/pages/BankFrame.tsx
+++ b/packages/demobank-ui/src/pages/BankFrame.tsx
@@ -165,7 +165,8 @@ export function BankFrame({
           </div>
           <div style="flex-grow:1" />
           <p>
-            Copyright &copy; 2014&mdash;2022 Taler Systems SA. {versionText}
+            Copyright &copy; 2014&mdash;2022 Taler Systems SA. {versionText}{" "}
+            <TestingTag />
           </p>
         </div>
       </section>
@@ -299,3 +300,23 @@ function StatusBanner(): VNode | null {
     </div>
   );
 }
+
+function TestingTag(): VNode {
+  const testingUrl = localStorage.getItem("bank-base-url");
+  if (!testingUrl) return <Fragment />;
+  return (
+    <span style={{ color: "gray" }}>
+      Testing with {testingUrl}{" "}
+      <a
+        href=""
+        onClick={(e) => {
+          e.preventDefault();
+          localStorage.removeItem("bank-base-url");
+          window.location.reload();
+        }}
+      >
+        stop testing
+      </a>
+    </span>
+  );
+}
-- 
cgit v1.2.3

