From a35604fd562a72e4e266bf6a4255d89d3c1374a1 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 19 Nov 2021 14:51:27 -0300
Subject: some changes:

 - simplify design to reuse more components (from wallet instead of popup)
 - simplify hooks (useAsyncAsHook)
 - updateNotification from backend now filter events by type
 - new balance design proposed by Belen
 - more information when the withdrawal is in process
 - manual withdrawal implementation
 - some bugs killed
---
 .../src/wallet/CreateManualWithdraw.tsx            | 26 +++++++++++++++++-----
 1 file changed, 20 insertions(+), 6 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
index 140ac2d40..1bceabd20 100644
--- a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
@@ -19,17 +19,19 @@
  * @author Sebastian Javier Marchano (sebasjm)
  */
 
-import { AmountJson, Amounts } from "@gnu-taler/taler-util";
-import { h, VNode } from "preact";
+import { AmountJson, Amounts, i18n } from "@gnu-taler/taler-util";
+import { Fragment, h, VNode } from "preact";
 import { useState } from "preact/hooks";
 import { ErrorMessage } from "../components/ErrorMessage";
 import { SelectList } from "../components/SelectList";
 import {
+  BoldLight,
   ButtonPrimary,
+  ButtonSuccess,
+  Centered,
   Input,
   InputWithLabel,
   LightText,
-  WalletBox,
 } from "../components/styled";
 
 export interface Props {
@@ -82,11 +84,23 @@ export function CreateManualWithdraw({
   }
 
   if (!initialExchange) {
-    return <div>There is no known exchange where to withdraw, add one</div>;
+    return (
+      <Centered style={{ marginTop: 100 }}>
+        <BoldLight>No exchange configured</BoldLight>
+        <ButtonSuccess
+          //FIXME: add exchange feature
+          onClick={() => {
+            null;
+          }}
+        >
+          <i18n.Translate>Add exchange</i18n.Translate>
+        </ButtonSuccess>
+      </Centered>
+    );
   }
 
   return (
-    <WalletBox>
+    <Fragment>
       <section>
         <ErrorMessage
           title={error && "Can't create the reserve"}
@@ -145,6 +159,6 @@ export function CreateManualWithdraw({
           Start withdrawal
         </ButtonPrimary>
       </footer>
-    </WalletBox>
+    </Fragment>
   );
 }
-- 
cgit v1.2.3

