diff options
author | Sebastian <sebasjm@gmail.com> | 2024-04-03 15:31:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-04-03 15:31:28 -0300 |
commit | c7e68c254aa93778b8201227d6db1ac57e081e81 (patch) | |
tree | b5d34651a8d17180826dcd4f09bb808f2f080b21 /packages/merchant-backoffice-ui/src/paths/instance/transfers | |
parent | 4bf1ab8ba924b2a0fc4813814bdeeb66a2928382 (diff) | |
download | wallet-core-c7e68c254aa93778b8201227d6db1ac57e081e81.tar.xz |
wip #8655: unauthorized not documented
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/transfers')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx index 5edea377f..b53f67884 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx @@ -19,13 +19,14 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { TalerError } from "@gnu-taler/taler-util"; +import { HttpStatusCode, TalerError, assertUnreachable } from "@gnu-taler/taler-util"; import { VNode, h } from "preact"; import { useEffect, useState } from "preact/hooks"; import { ErrorLoadingMerchant } from "../../../../components/ErrorLoadingMerchant.js"; import { Loading } from "../../../../components/exception/loading.js"; import { useInstanceBankAccounts } from "../../../../hooks/bank.js"; import { useInstanceTransfers } from "../../../../hooks/transfer.js"; +import { LoginPage } from "../../../login/index.js"; import { ListPage } from "./ListPage.js"; interface Props { @@ -73,17 +74,16 @@ export default function ListTransfer({ if (result instanceof TalerError) { return <ErrorLoadingMerchant error={result} />; } - // if (result.type === "fail") { - // switch (result.case) { - // case HttpStatusCode.NotFound: { - // return <NotFoundPageOrAdminCreate />; - // } - // default: { - // assertUnreachable(result.case); - // } - // } - // } - + if (result.type === "fail") { + switch (result.case) { + case HttpStatusCode.Unauthorized: { + return <LoginPage /> + } + default: { + assertUnreachable(result.case); + } + } + } return ( <ListPage |