From 98013322db6b912ac50d72353dbd8b5f7fbc0435 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 6 Oct 2023 10:38:09 -0300 Subject: backoffice ui --- packages/merchant-backoffice-ui/src/hooks/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/merchant-backoffice-ui/src/hooks/index.ts') diff --git a/packages/merchant-backoffice-ui/src/hooks/index.ts b/packages/merchant-backoffice-ui/src/hooks/index.ts index 498e4eb78..3c8ef15ed 100644 --- a/packages/merchant-backoffice-ui/src/hooks/index.ts +++ b/packages/merchant-backoffice-ui/src/hooks/index.ts @@ -32,7 +32,13 @@ const calculateRootPath = () => { ? window.location.origin + window.location.pathname : "/"; - return rootPath.replace("webui/",""); + /** + * By default, merchant backend serves the html content + * from the /webui root. This should cover most of the + * cases and the rootPath will be the merchant backend + * URL where the instances are + */ + return rootPath.replace("/webui/", ""); }; const loginTokenCodec = buildCodecForObject() -- cgit v1.2.3