diff options
author | Sebastian <sebasjm@gmail.com> | 2022-01-20 13:12:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-01-24 09:46:20 -0300 |
commit | e38be8d8ec1bdf1c854a2391ae9f4641cb69a249 (patch) | |
tree | c814b2945fb6f5aebb60419c680ab12c8a3309f2 /packages/taler-wallet-webextension/src/cta/Withdraw.tsx | |
parent | e263907017958585c1eaf3c3284314fab5d36c85 (diff) | |
download | wallet-core-e38be8d8ec1bdf1c854a2391ae9f4641cb69a249.tar.xz |
using loadingerror
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw.tsx | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx index 0a06bd577..a4ee640ca 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx @@ -30,6 +30,8 @@ import { } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; +import { Loading } from "../components/Loading"; +import { LoadingError } from "../components/LoadingError"; import { LogoHeader } from "../components/LogoHeader"; import { Part } from "../components/Part"; import { SelectList } from "../components/SelectList"; @@ -237,19 +239,14 @@ export function WithdrawPageWithParsedURI({ }); if (!detailsHook) { - return ( - <span> - <i18n.Translate>Getting withdrawal details.</i18n.Translate> - </span> - ); + return <Loading />; } if (detailsHook.hasError) { return ( - <span> - <i18n.Translate> - Problems getting details: {detailsHook.message} - </i18n.Translate> - </span> + <LoadingError + title="Could not load the withdrawal details" + error={detailsHook} + /> ); } @@ -315,21 +312,17 @@ export function WithdrawPage({ talerWithdrawUri }: Props): VNode { ); } if (!uriInfoHook) { - return ( - <span> - <i18n.Translate>Loading...</i18n.Translate> - </span> - ); + return <Loading />; } if (uriInfoHook.hasError) { return ( - <span> - <i18n.Translate> - This URI is not valid anymore: {uriInfoHook.message} - </i18n.Translate> - </span> + <LoadingError + title="Could not get the info from the URI" + error={uriInfoHook} + /> ); } + return ( <WithdrawPageWithParsedURI uri={talerWithdrawUri} |