aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance/templates
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-02-08 17:39:39 -0300
committerSebastian <sebasjm@gmail.com>2023-02-08 17:39:39 -0300
commit603efbd073a2a9aa56f801fe57d13f060821b05d (patch)
tree9ca8367dbbe6e47b2a11ac67bbc2747298fcd255 /packages/merchant-backoffice-ui/src/paths/instance/templates
parentbe01d1479cf650fe8eb0c8e567620abfa4544e1e (diff)
downloadwallet-core-603efbd073a2a9aa56f801fe57d13f060821b05d.tar.xz
use request api from web-util
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx8
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx1
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx8
4 files changed, 15 insertions, 10 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx
index 5fce3a819..0b7c191bd 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/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 { 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 {
useInstanceTemplates,
useTemplateAPI,
@@ -35,7 +37,7 @@ import { ListPage } from "./ListPage.js";
interface Props {
onUnauthorized: () => VNode;
- onLoadError: (error: HttpError) => VNode;
+ onLoadError: (error: HttpError<MerchantBackend.ErrorDetail>) => VNode;
onNotFound: () => VNode;
onCreate: () => void;
onSelect: (id: string) => void;
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx
index 684ffd429..73489869b 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/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, WithId } from "../../../../declaration.js";
-import { HttpError } from "../../../../utils/request.js";
import {
useTemplateAPI,
useTemplateDetails,
@@ -40,7 +42,7 @@ interface Props {
onConfirm: () => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
tid: string;
}
export default function UpdateTemplate({
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx
index cbcadc608..13576d94d 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/Use.stories.tsx
@@ -19,7 +19,6 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { h, VNode, FunctionalComponent } from "preact";
import { UsePage as TestedComponent } from "./UsePage.js";
export default {
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx
index fa9a98c6d..d5fa6d39d 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/use/index.tsx
@@ -19,7 +19,10 @@
* @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";
@@ -29,7 +32,6 @@ import {
useTemplateAPI,
useTemplateDetails,
} from "../../../../hooks/templates.js";
-import { HttpError } from "../../../../utils/request.js";
import { Notification } from "../../../../utils/types.js";
import { UsePage } from "./UsePage.js";
@@ -39,7 +41,7 @@ interface Props {
onOrderCreated: (id: string) => void;
onUnauthorized: () => VNode;
onNotFound: () => VNode;
- onLoadError: (e: HttpError) => VNode;
+ onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
tid: string;
}