gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant-backoffice] 02/03: Wrap placeholders in "__" instead of


From: gnunet
Subject: [taler-merchant-backoffice] 02/03: Wrap placeholders in "__" instead of "%".
Date: Tue, 10 May 2022 12:43:03 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository merchant-backoffice.

commit 35f9e16f2c32abfed0406cea0fb18bf198a88114
Author: ms <ms@taler.net>
AuthorDate: Mon May 9 11:08:28 2022 +0200

    Wrap placeholders in "__" instead of "%".
    
    That allows to use placeholders also as variable
    names (needs @ts-ignore), instead of only as string
    literals.
---
 packages/bank/src/pages/home/index.tsx | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/packages/bank/src/pages/home/index.tsx 
b/packages/bank/src/pages/home/index.tsx
index 898bef3..b130dd1 100644
--- a/packages/bank/src/pages/home/index.tsx
+++ b/packages/bank/src/pages/home/index.tsx
@@ -762,11 +762,11 @@ function BankFrame(Props: any): VNode {
 
   // Prepare demo sites links.
   let DEMO_SITES = [
-    ["Landing", "%DEMO_SITE_LANDING_URL%"],
-    ["Bank", "%DEMO_SITE_BANK_URL%"],
-    ["Blog", "%DEMO_SITE_BLOG_URL%"],
-    ["Donations", "%DEMO_SITE_DONATIONS_URL%"],
-    ["Survey", "%DEMO_SITE_SURVEY_URL%"],
+    ["Landing", "__DEMO_SITE_LANDING_URL__"],
+    ["Bank", "__DEMO_SITE_BANK_URL__"],
+    ["Blog", "__DEMO_SITE_BLOG_URL__"],
+    ["Donations", "__DEMO_SITE_DONATIONS_URL__"],
+    ["Survey", "__DEMO_SITE_SURVEY_URL__"],
   ];
   let demo_sites = [];
   for (const i in DEMO_SITES) {
@@ -1630,23 +1630,25 @@ export function BankHome(): VNode {
     </SWRWithoutCredentials>);
   }
   if (pageState.tryRegister) {
-    if (typeof %LIBEUFIN_UI_ALLOW_REGISTRATIONS% !== "undefined" && 
!%LIBEUFIN_UI_ALLOW_REGISTRATIONS%) {
+    // @ts-ignore
+    if (__LIBEUFIN_UI_ALLOW_REGISTRATIONS__) {
       return (
         <PageContext.Provider value={[pageState, pageStateSetter]}>
           <BankFrame>
-         <p>i18n`Currently, the bank is not accepting new registrations!`</p>
-       </BankFrame>
+           <RegistrationForm backendStateSetter={backendStateSetter} />
+         </BankFrame>
         </PageContext.Provider>
       );
     }
     return (
       <PageContext.Provider value={[pageState, pageStateSetter]}>
         <BankFrame>
-         <RegistrationForm backendStateSetter={backendStateSetter} />
+         <p>i18n`Currently, the bank is not accepting new registrations!`</p>
        </BankFrame>
       </PageContext.Provider>
     );
   }
+
   /**
    * Credentials were correct, now render the bank account page,
    * with balance, transactions history, and a Taler withdrawal

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]