Skip to content

Commit 4f3b6f2

Browse files
raheeliftikhar5ludomikula
authored andcommitted
subpath relative route in app editor
1 parent 3151738 commit 4f3b6f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

client/packages/lowcoder/src/pages/editor/AppEditor.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import { AppState } from "@lowcoder-ee/redux/reducers";
3737
import { resetIconDictionary } from "@lowcoder-ee/constants/iconConstants";
3838
import {fetchJsDSPaginationByApp} from "@lowcoder-ee/util/pagination/axios";
3939
import PaginationComp from "@lowcoder-ee/util/pagination/Pagination";
40+
import history from "@lowcoder-ee/util/history";
4041

4142
const AppSnapshot = lazy(() => {
4243
return import("pages/editor/appSnapshot")
@@ -67,12 +68,12 @@ const AppEditor = React.memo(() => {
6768
// Memoize selectors to prevent unnecessary re-renders
6869
const selectors = useMemo(() => ({
6970
isUserViewMode: params.viewMode ? isUserViewModeCheck : true,
70-
applicationId: params.applicationId || window.location.pathname.split("/")[2],
71-
paramViewMode: params.viewMode || window.location.pathname.split("/")[3],
71+
applicationId: params.applicationId || history.location.pathname.split("/")[2],
72+
paramViewMode: params.viewMode || history.location.pathname.split("/")[3],
7273
viewMode: (params.viewMode === "view" || params.viewMode === "admin")
7374
? "published"
7475
: params.viewMode === "view_marketplace" ? "view_marketplace" : "editing",
75-
}), [params.viewMode, params.applicationId, window.location.pathname, isUserViewModeCheck]);
76+
}), [params.viewMode, params.applicationId, history.location.pathname, isUserViewModeCheck]);
7677

7778
const firstRendered = useRef(false);
7879
const orgId = useMemo(() => currentUser.currentOrgId, [currentUser.currentOrgId]);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy