From 7a43421af527fb53731731dd2d05a996d8c92e0c Mon Sep 17 00:00:00 2001 From: Patryk Andrzejewski Date: Mon, 16 Jan 2023 11:09:24 +0100 Subject: [PATCH] Use mount uri in redirect (#2979) * Reflect mount uri in the app redirect * use URL constructor --- src/apps/components/AppFrame/useAppActions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/apps/components/AppFrame/useAppActions.ts b/src/apps/components/AppFrame/useAppActions.ts index 31cbc719f..97468c31c 100644 --- a/src/apps/components/AppFrame/useAppActions.ts +++ b/src/apps/components/AppFrame/useAppActions.ts @@ -112,7 +112,10 @@ export const useAppActions = ( case "updateRouting": { const { newRoute, actionId } = action.payload; - const appCompletePath = appPath(encodeURIComponent(appId)); + const appCompletePath = new URL( + appPath(encodeURIComponent(appId)), + getAppMountUri(), + ).href; window.history.pushState(null, "", appCompletePath + newRoute);