From b650750bccf40dfb12d0fc455cbebd8fa1fd5277 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 17 Mar 2022 12:39:16 -0300 Subject: no more back button --- .../src/wallet/DepositPage.tsx | 38 +++++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx index a5b5997b3..85541ab23 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx @@ -26,6 +26,7 @@ import { useEffect, useState } from "preact/hooks"; import { Loading } from "../components/Loading"; import { SelectList } from "../components/SelectList"; import { + Button, ButtonBoxWarning, ButtonPrimary, ErrorText, @@ -39,9 +40,10 @@ import * as wxApi from "../wxApi"; interface Props { currency: string; + onCancel: (currency: string) => void; onSuccess: (currency: string) => void; } -export function DepositPage({ currency, onSuccess }: Props): VNode { +export function DepositPage({ currency, onCancel, onSuccess }: Props): VNode { const state = useAsyncAsHook(async () => { const balance = await wxApi.getBalance(); const bs = balance.balances.filter((b) => b.available.startsWith(currency)); @@ -79,6 +81,7 @@ export function DepositPage({ currency, onSuccess }: Props): VNode { return ( ; balance: AmountJson; + onCancel: (currency: string) => void; onSend: (account: string, amount: AmountString) => Promise; onCalculateFee: ( account: string, @@ -98,6 +102,7 @@ interface ViewProps { } export function View({ + onCancel, knownBankAccounts, balance, onSend, @@ -142,16 +147,23 @@ export function View({ } if (!knownBankAccounts || !knownBankAccounts.length) { return ( - -

- - There is no known bank account to send money to - -

- - Withdraw - -
+ + +

+ + There is no known bank account to send money to + +

+ + Withdraw + +
+
+ +
+
); } const parsedAmount = @@ -242,7 +254,9 @@ export function View({ }