From 0aa26448d45da1a27c465dbf2f7ca8adc59da234 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Thu, 20 Jan 2022 14:21:30 -0300
Subject: fix: cta header, fix: do not reset ToS ETAG when getting the exchange
 ToS

---
 .../taler-wallet-webextension/src/walletEntryPoint.tsx    | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/walletEntryPoint.tsx')

diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
index 85e38d85a..dbcf053e2 100644
--- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
+++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx
@@ -22,7 +22,7 @@
 
 import { setupI18n } from "@gnu-taler/taler-util";
 import { createHashHistory } from "history";
-import { h, render, VNode } from "preact";
+import { Fragment, h, render, VNode } from "preact";
 import Router, { route, Route } from "preact-router";
 import Match from "preact-router/match";
 import { useEffect, useState } from "preact/hooks";
@@ -86,14 +86,19 @@ function Application(): VNode {
       <DevContextProvider>
         {({ devMode }: { devMode: boolean }) => (
           <IoCProviderForRuntime>
-            <LogoHeader />
             {/* <Match/> won't work in the first render if <Router /> is not called first */}
             {/* https://github.com/preactjs/preact-router/issues/415 */}
             <Router history={hash_history} />
             <Match>
-              {({ path }: { path: string }) => (
-                <NavBar devMode={devMode} path={path} />
-              )}
+              {({ path }: { path: string }) => {
+                if (path && path.startsWith("/cta")) return;
+                return (
+                  <Fragment>
+                    <LogoHeader />
+                    <NavBar devMode={devMode} path={path} />
+                  </Fragment>
+                );
+              }}
             </Match>
             <WalletBox>
               {globalNotification && (
-- 
cgit v1.2.3

