diff options
author | Sebastian <sebasjm@gmail.com> | 2022-01-10 16:04:53 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-01-10 16:07:27 -0300 |
commit | fb22009ec4799a624f00c228fbd7435b44c1cbac (patch) | |
tree | b1f8427e845bb3687b8a64deb3545eff2290ec67 /packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx | |
parent | 83b9d32b7812e63640a60b5b42a27c96d8053bce (diff) | |
download | wallet-core-fb22009ec4799a624f00c228fbd7435b44c1cbac.tar.xz |
deposit design from belen, feature missing: kyc
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx index b3e8a2c25..c7958eb8a 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { VNode, h } from "preact"; +import { VNode, h, Fragment } from "preact"; import { useState } from "preact/hooks"; import { CreateManualWithdraw } from "./CreateManualWithdraw"; import * as wxApi from "../wxApi"; @@ -29,8 +29,10 @@ import { route } from "preact-router"; import { Pages } from "../NavigationBar"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; import { ExchangeAddPage } from "./ExchangeAddPage"; +import { Loading } from "../components/Loading"; +import { ErrorBox } from "../components/styled"; -export function ManualWithdrawPage(): VNode { +export function ManualWithdrawPage({ currency }: { currency?: string }): VNode { const [success, setSuccess] = useState< | { response: AcceptManualWithdrawalResult; @@ -86,10 +88,15 @@ export function ManualWithdrawPage(): VNode { } if (!state) { - return <div>loading...</div>; + return <Loading />; } if (state.hasError) { - return <div>There was an error getting the known exchanges</div>; + return ( + <Fragment> + <ErrorBox>{state.message}</ErrorBox> + <p>There was an error getting the known exchanges</p> + </Fragment> + ); } const exchangeList = state.response.exchanges.reduce( (p, c) => ({ @@ -105,6 +112,7 @@ export function ManualWithdrawPage(): VNode { error={error} exchangeList={exchangeList} onCreate={doCreate} + initialCurrency={currency} /> ); } |