aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/hooks/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/hooks/index.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/hooks/index.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/index.ts b/packages/merchant-backoffice-ui/src/hooks/index.ts
index 10e77716e..b77b9dea8 100644
--- a/packages/merchant-backoffice-ui/src/hooks/index.ts
+++ b/packages/merchant-backoffice-ui/src/hooks/index.ts
@@ -53,15 +53,17 @@ export function useBackendURL(
export function useBackendDefaultToken(
initialValue?: string,
-): [string | undefined, ((d:string | undefined) => void)] {
- const {update, value} = useMemoryStorage(`backend-token`, initialValue)
+): [string | undefined, ((d: string | undefined) => void)] {
+ // uncomment for testing
+ initialValue = "secret-token:secret" as string | undefined
+ const { update, value } = useMemoryStorage(`backend-token`, initialValue)
return [value, update];
}
export function useBackendInstanceToken(
id: string,
-): [string | undefined, ((d:string | undefined) => void)] {
- const {update:setToken, value:token, reset} = useMemoryStorage(`backend-token-${id}`)
+): [string | undefined, ((d: string | undefined) => void)] {
+ const { update: setToken, value: token, reset } = useMemoryStorage(`backend-token-${id}`)
const [defaultToken, defaultSetToken] = useBackendDefaultToken();
// instance named 'default' use the default token