From a7c8f0f3edd738a59d719105cda3aa8821886b90 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 15 Apr 2024 12:01:16 -0300 Subject: fix #8604 --- .../src/paths/instance/templates/update/UpdatePage.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx') diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx index a4813c8e9..eedb77f28 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx @@ -28,8 +28,7 @@ import { TranslatedString, } from "@gnu-taler/taler-util"; import { - useMerchantApiContext, - useTranslationContext, + useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; import { useState } from "preact/hooks"; @@ -45,6 +44,7 @@ import { InputNumber } from "../../../../components/form/InputNumber.js"; import { InputSelector } from "../../../../components/form/InputSelector.js"; import { InputToggle } from "../../../../components/form/InputToggle.js"; import { TextField } from "../../../../components/form/TextField.js"; +import { useSessionContext } from "../../../../context/session.js"; import { useInstanceOtpDevices } from "../../../../hooks/otp.js"; type Entity = { @@ -67,7 +67,8 @@ interface Props { export function UpdatePage({ template, onUpdate, onBack }: Props): VNode { const { i18n } = useTranslationContext(); - const { url: backendUrl, config } = useMerchantApiContext(); + const { config } = useSessionContext(); + const {state:session} = useSessionContext(); const [state, setState] = useState>({ description: template.template_description, @@ -176,7 +177,7 @@ export function UpdatePage({ template, onUpdate, onBack }: Props): VNode {
- {new URL(`templates/${template.id}`, backendUrl.href).href} + {new URL(`templates/${template.id}`, session.backendUrl.href).href}
-- cgit v1.2.3