diff options
Diffstat (limited to 'packages/bank-ui')
4 files changed, 24 insertions, 4 deletions
diff --git a/packages/bank-ui/src/pages/AccountPage/index.ts b/packages/bank-ui/src/pages/AccountPage/index.ts index 8a9471ef4..e96702652 100644 --- a/packages/bank-ui/src/pages/AccountPage/index.ts +++ b/packages/bank-ui/src/pages/AccountPage/index.ts @@ -26,6 +26,7 @@ import { LoginForm } from "../LoginForm.js"; import { useComponentState } from "./state.js"; import { InvalidIbanView, ReadyView } from "./views.js"; import { RouteDefinition } from "@gnu-taler/web-util/browser"; +import { Fragment } from "preact"; export interface Props { account: string; @@ -125,7 +126,11 @@ const viewMapping: utils.StateViewMap<State> = { loading: Loading, login: LoginForm, "invalid-iban": InvalidIbanView, - "loading-error": ErrorLoadingWithDebug, + "loading-error": (d) => { + return Fragment({ + children: [ErrorLoadingWithDebug({ error: d.error }), LoginForm({})], + })!; + }, ready: ReadyView, }; diff --git a/packages/bank-ui/src/pages/WireTransfer.tsx b/packages/bank-ui/src/pages/WireTransfer.tsx index f45390938..817145702 100644 --- a/packages/bank-ui/src/pages/WireTransfer.tsx +++ b/packages/bank-ui/src/pages/WireTransfer.tsx @@ -62,7 +62,12 @@ export function WireTransfer({ return <Loading />; } if (result instanceof TalerError) { - return <ErrorLoadingWithDebug error={result} />; + return ( + <Fragment> + <ErrorLoadingWithDebug error={result} /> + <LoginForm currentUser={account} /> + </Fragment> + ); } if (result.type === "fail") { switch (result.case) { diff --git a/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx b/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx index 7db81115f..f602c67df 100644 --- a/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx +++ b/packages/bank-ui/src/pages/account/ShowAccountDetails.tsx @@ -91,7 +91,12 @@ export function ShowAccountDetails({ return <Loading />; } if (result instanceof TalerError) { - return <ErrorLoadingWithDebug error={result} />; + return ( + <Fragment> + <ErrorLoadingWithDebug error={result} /> + <LoginForm currentUser={account} /> + </Fragment> + ); } if (result.type === "fail") { switch (result.case) { diff --git a/packages/bank-ui/src/pages/admin/RemoveAccount.tsx b/packages/bank-ui/src/pages/admin/RemoveAccount.tsx index dbeebf719..74e39112d 100644 --- a/packages/bank-ui/src/pages/admin/RemoveAccount.tsx +++ b/packages/bank-ui/src/pages/admin/RemoveAccount.tsx @@ -74,7 +74,12 @@ export function RemoveAccount({ return <Loading />; } if (result instanceof TalerError) { - return <ErrorLoadingWithDebug error={result} />; + return ( + <Fragment> + <ErrorLoadingWithDebug error={result} /> + <LoginForm currentUser={account} /> + </Fragment> + ); } if (result.type === "fail") { switch (result.case) { |