diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/orders/list')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx index 7a3fb2d22..8efef1c1b 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx @@ -46,6 +46,7 @@ import { Notification } from "../../../../utils/types.js"; import { NotFoundPageOrAdminCreate } from "../../../notfound/index.js"; import { ListPage } from "./ListPage.js"; import { RefundModal } from "./Table.js"; +import { LoginPage } from "../../../login/index.js"; interface Props { onSelect: (id: string) => void; @@ -75,16 +76,16 @@ export default function OrderList({ onCreate, onSelect }: Props): VNode { 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) + } + } + } const isNotPaidActive = filter.paid === false ? "is-active" : ""; const isPaidActive = @@ -206,6 +207,9 @@ function RefundModalForTable({ id, onConfirm, onCancel }: RefundProps): VNode { <div>The merchant's interaction with the exchange took too long</div> ); } + case HttpStatusCode.Unauthorized: { + return <LoginPage /> + } default: { assertUnreachable(result); } |