From f31b0a4b422d8e419cd011ced04b35ced68e5e01 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 26 Sep 2022 22:16:56 +0200 Subject: -fix spa --- packages/bank/src/pages/home/index.tsx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'packages') diff --git a/packages/bank/src/pages/home/index.tsx b/packages/bank/src/pages/home/index.tsx index 90e044f..f74b3b3 100644 --- a/packages/bank/src/pages/home/index.tsx +++ b/packages/bank/src/pages/home/index.tsx @@ -12,11 +12,11 @@ import talerLogo from '../../assets/logo-white.svg'; import { LangSelectorLikePy as LangSelector } from '../../components/menu/LangSelector'; // @ts-ignore -const __LIBEUFIN_UI_ALLOW_REGISTRATIONS__ = window.__LIBEUFIN_UI_ALLOW_REGISTRATIONS__ ?? 1; +const UI_ALLOW_REGISTRATIONS = ('__LIBEUFIN_UI_ALLOW_REGISTRATIONS__') ?? 1; // @ts-ignore -const __LIBEUFIN_UI_IS_DEMO__ = window.__LIBEUFIN_UI_IS_DEMO__ ?? 0; +const UI_IS_DEMO = ('__LIBEUFIN_UI_IS_DEMO__') ?? 0; // @ts-ignore -const __LIBEUFIN_UI_BANK_NAME__ = window.__LIBEUFIN_UI_BANK_NAME__ ?? 'Taler Bank'; +const UI_BANK_NAME = ('__LIBEUFIN_UI_BANK_NAME__') ?? 'Taler Bank'; /** * FIXME: @@ -133,7 +133,7 @@ interface AccountStateType { ***********/ function maybeDemoContent(content: VNode) { - if (__LIBEUFIN_UI_IS_DEMO__) return content; + if (UI_IS_DEMO) return content; } async function fetcher(url: string) { @@ -865,7 +865,7 @@ function BankFrame(Props: any): VNode {

{ - __LIBEUFIN_UI_BANK_NAME__ + UI_BANK_NAME } @@ -1284,7 +1284,7 @@ function TalerWithdrawal(Props: any): VNode { function RegistrationButton(Props: any): VNode { const { backendStateSetter, pageStateSetter } = Props; const i18n = useTranslator(); - if (__LIBEUFIN_UI_ALLOW_REGISTRATIONS__) + if (UI_ALLOW_REGISTRATIONS) { return () - + RegistrationButton(props) + - ( + + {RegistrationButton(Props)} ); } @@ -1380,7 +1379,7 @@ function RegistrationForm(Props: any): VNode {

{ - i18n`Welcome to ${__LIBEUFIN_UI_BANK_NAME__}!` + i18n`Welcome to ${UI_BANK_NAME}!` }