diff options
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 |