From 603efbd073a2a9aa56f801fe57d13f060821b05d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 8 Feb 2023 17:39:39 -0300 Subject: use request api from web-util --- .../src/paths/instance/products/list/index.tsx | 8 +++++--- .../src/paths/instance/products/update/index.tsx | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'packages/merchant-backoffice-ui/src/paths/instance/products') diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx index 25332acee..c32339563 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx @@ -19,13 +19,15 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser"; +import { + HttpError, + useTranslationContext, +} from "@gnu-taler/web-util/lib/index.browser"; import { h, VNode } from "preact"; import { useState } from "preact/hooks"; import { Loading } from "../../../../components/exception/loading.js"; import { NotificationCard } from "../../../../components/menu/index.js"; import { MerchantBackend, WithId } from "../../../../declaration.js"; -import { HttpError } from "../../../../utils/request.js"; import { useInstanceProducts, useProductAPI, @@ -38,7 +40,7 @@ interface Props { onNotFound: () => VNode; onCreate: () => void; onSelect: (id: string) => void; - onLoadError: (e: HttpError) => VNode; + onLoadError: (e: HttpError) => VNode; } export default function ProductList({ onUnauthorized, diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx index 5b19a7aa3..b35606f53 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx @@ -19,13 +19,15 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser"; +import { + HttpError, + useTranslationContext, +} from "@gnu-taler/web-util/lib/index.browser"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { Loading } from "../../../../components/exception/loading.js"; import { NotificationCard } from "../../../../components/menu/index.js"; import { MerchantBackend } from "../../../../declaration.js"; -import { HttpError } from "../../../../utils/request.js"; import { useProductAPI, useProductDetails } from "../../../../hooks/product.js"; import { Notification } from "../../../../utils/types.js"; import { UpdatePage } from "./UpdatePage.js"; @@ -36,7 +38,7 @@ interface Props { onConfirm: () => void; onUnauthorized: () => VNode; onNotFound: () => VNode; - onLoadError: (e: HttpError) => VNode; + onLoadError: (e: HttpError) => VNode; pid: string; } export default function UpdateProduct({ -- cgit v1.2.3