Skip to content

Commit a2110ec

Browse files
subpath relative route for app preview
1 parent d05072f commit a2110ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/packages/lowcoder/src/constants/routesURL.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { AppViewMode, MarketplaceType } from "constants/applicationConstants";
22
import { LocationDescriptor } from "history";
33
import { UserGuideLocationState } from "pages/tutorials/tutorialsConstant";
44
import { DatasourceType } from "@lowcoder-ee/constants/queryConstants";
5+
import history from "@lowcoder-ee/util/history";
56

67
export const BASE_URL = "/";
78
export const ADMIN_AUTH_URL = "/admin/login";
@@ -113,7 +114,7 @@ export const buildAppRouteWithState = (
113114
};
114115

115116
export function preview(applicationId: string) {
116-
window.open(APPLICATION_VIEW_URL(applicationId, "preview"));
117+
window.open(history.createHref({pathname: APPLICATION_VIEW_URL(applicationId, "preview")}));
117118
}
118119

119120
export const buildGroupId = (groupId: string) => `${PERMISSION_SETTING}/${groupId}`;

0 commit comments

Comments
 (0)