@@ -37,6 +37,7 @@ import { AppState } from "@lowcoder-ee/redux/reducers";
37
37
import { resetIconDictionary } from "@lowcoder-ee/constants/iconConstants" ;
38
38
import { fetchJsDSPaginationByApp } from "@lowcoder-ee/util/pagination/axios" ;
39
39
import PaginationComp from "@lowcoder-ee/util/pagination/Pagination" ;
40
+ import history from "@lowcoder-ee/util/history" ;
40
41
41
42
const AppSnapshot = lazy ( ( ) => {
42
43
return import ( "pages/editor/appSnapshot" )
@@ -67,12 +68,12 @@ const AppEditor = React.memo(() => {
67
68
// Memoize selectors to prevent unnecessary re-renders
68
69
const selectors = useMemo ( ( ) => ( {
69
70
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 ] ,
72
73
viewMode : ( params . viewMode === "view" || params . viewMode === "admin" )
73
74
? "published"
74
75
: 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 ] ) ;
76
77
77
78
const firstRendered = useRef ( false ) ;
78
79
const orgId = useMemo ( ( ) => currentUser . currentOrgId , [ currentUser . currentOrgId ] ) ;
0 commit comments