diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx index 984880752..4b0db200a 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/token/DetailPage.tsx @@ -26,12 +26,13 @@ import { AsyncButton } from "../../../components/exception/AsyncButton.js"; import { FormProvider } from "../../../components/form/FormProvider.js"; import { Input } from "../../../components/form/Input.js"; import { useInstanceContext } from "../../../context/instance.js"; +import { AccessToken } from "../../../declaration.js"; interface Props { instanceId: string; currentToken: string | undefined; onClearToken: () => void; - onNewToken: (s: string) => void; + onNewToken: (s: AccessToken) => void; onBack?: () => void; } @@ -71,7 +72,8 @@ export function DetailPage({ instanceId, currentToken: oldToken, onBack, onNewTo async function submitForm() { if (hasErrors) return; - onNewToken(form.new_token as any) + const nt = `secret-token:${form.new_token}` as AccessToken; + onNewToken(nt) } return ( |