diff options
author | Sebastian <sebasjm@gmail.com> | 2024-03-22 13:56:16 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-03-26 16:57:58 -0300 |
commit | e2bfbced7ab027c901913e83ff7dd82240661990 (patch) | |
tree | 33752605ccaf19498f8c2a64e0117db16f22ce26 /packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx | |
parent | 0c265558c4b7b78a13272abf1c4c84e3cf93c987 (diff) | |
download | wallet-core-e2bfbced7ab027c901913e83ff7dd82240661990.tar.gz wallet-core-e2bfbced7ab027c901913e83ff7dd82240661990.tar.bz2 wallet-core-e2bfbced7ab027c901913e83ff7dd82240661990.zip |
work in progress, new api being used. merchant now should move into using the full API
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/templates/update/UpdatePage.tsx | 14 |
1 files changed, 8 insertions, 6 deletions
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 cdf2ebab4..ae11ad991 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 @@ -26,7 +26,7 @@ import { assertUnreachable } from "@gnu-taler/taler-util"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; -import { Fragment, VNode, h } from "preact"; +import { VNode, h } from "preact"; import { useState } from "preact/hooks"; import { AsyncButton } from "../../../../components/exception/AsyncButton.js"; import { @@ -37,11 +37,10 @@ import { Input } from "../../../../components/form/Input.js"; import { InputCurrency } from "../../../../components/form/InputCurrency.js"; import { InputDuration } from "../../../../components/form/InputDuration.js"; import { InputNumber } from "../../../../components/form/InputNumber.js"; +import { InputSearchOnList } from "../../../../components/form/InputSearchOnList.js"; import { InputTab } from "../../../../components/form/InputTab.js"; -import { InputWithAddon } from "../../../../components/form/InputWithAddon.js"; -import { useBackendContext } from "../../../../context/backend.js"; +import { useSessionContext } from "../../../../context/session.js"; import { MerchantBackend } from "../../../../declaration.js"; -import { InputSearchOnList } from "../../../../components/form/InputSearchOnList.js"; import { useInstanceOtpDevices } from "../../../../hooks/otp.js"; enum Steps { @@ -68,7 +67,10 @@ interface Props { export function UpdatePage({ template, onUpdate, onBack }: Props): VNode { const { i18n } = useTranslationContext(); - const { url: backendURL } = useBackendContext() + const { + state: { backendUrl }, + } = useSessionContext(); + const intialStep = template.template_contract.amount === undefined && template.template_contract.summary === undefined @@ -187,7 +189,7 @@ export function UpdatePage({ template, onUpdate, onBack }: Props): VNode { <div class="level-left"> <div class="level-item"> <span class="is-size-4"> - {backendURL}/templates/{template.otp_id} + {new URL(`templates/${template.otp_id}`,backendUrl).href} </span> </div> </div> |