[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 02/02: show error inplace instead of notification
From: |
gnunet |
Subject: |
[taler-wallet-core] 02/02: show error inplace instead of notification |
Date: |
Thu, 02 Nov 2023 03:17:57 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit 9bd94fc648359ef635138d518f3cc9515ba806f3
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Nov 1 23:17:33 2023 -0300
show error inplace instead of notification
---
packages/demobank-ui/src/pages/WithdrawalOperationPage.tsx | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/packages/demobank-ui/src/pages/WithdrawalOperationPage.tsx
b/packages/demobank-ui/src/pages/WithdrawalOperationPage.tsx
index 7ef2a6c39..4620e5456 100644
--- a/packages/demobank-ui/src/pages/WithdrawalOperationPage.tsx
+++ b/packages/demobank-ui/src/pages/WithdrawalOperationPage.tsx
@@ -16,16 +16,14 @@
import {
Logger,
- TranslatedString,
parseWithdrawUri,
stringifyWithdrawUri
} from "@gnu-taler/taler-util";
import {
- notifyError,
useTranslationContext
} from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
-import { Loading } from "../components/Loading.js";
+import { Attention } from "../components/Attention.js";
import { useBankCoreApiContext } from "../context/config.js";
import { useSettings } from "../hooks/settings.js";
import { WithdrawalQRCode } from "./WithdrawalQRCode.js";
@@ -39,8 +37,6 @@ export function WithdrawalOperationPage({
operationId: string;
onContinue: () => void;
}): VNode {
- //FIXME: libeufin sandbox should return show to create the integration api
endpoint
- //or return withdrawal uri from response
const { api } = useBankCoreApiContext()
const uri = stringifyWithdrawUri({
bankIntegrationApiBaseUrl: api.getIntegrationAPI().baseUrl,
@@ -51,11 +47,9 @@ export function WithdrawalOperationPage({
const [settings, updateSettings] = useSettings();
if (!parsedUri) {
- notifyError(
- i18n.str`The Withdrawal URI is not valid`,
- uri as TranslatedString
- );
- return <Loading />;
+ return <Attention type="danger" title={i18n.str`The Withdrawal URI is not
valid`}>
+ {uri}
+ </Attention>
}
return (
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.