Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0060f16

Browse files
Merge pull request#1791 from iamfaran/folder-elements-endpoint
[Fix]: remove applications/list endpoint from home
2 parentsfa29568 +46a1477 commit0060f16

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

‎client/packages/lowcoder/src/pages/ApplicationV2/index.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
UserIcon,
3333
}from"lowcoder-design";
3434
importReact,{useCallback,useEffect,useState,useMemo}from"react";
35-
import{fetchAllApplications,fetchHomeData}from"redux/reduxActions/applicationActions";
35+
import{fetchHomeData}from"redux/reduxActions/applicationActions";
3636
import{fetchSubscriptionsAction}from"redux/reduxActions/subscriptionActions";
3737
import{getHomeOrg,normalAppListSelector}from"redux/selectors/applicationSelector";
3838
import{DatasourceHome}from"../datasource";
@@ -125,18 +125,13 @@ export default function ApplicationHome() {
125125
},[org,orgHomeId]);
126126

127127
useEffect(()=>{
128-
if(allAppCount!==0){
129-
return;
130-
}
131-
user.currentOrgId&&dispatch(fetchAllApplications({}));
132-
},[dispatch,allAppCount,user.currentOrgId]);
133-
134-
useEffect(()=>{
135-
if(allFoldersCount!==0){
128+
// Check if we need to fetch data (either no folders or no applications)
129+
if(allFoldersCount!==0&&allAppCount!==0){
136130
return;
137131
}
132+
138133
user.currentOrgId&&dispatch(fetchFolderElements({}));
139-
},[dispatch,allFoldersCount,user.currentOrgId]);
134+
},[dispatch,allFoldersCount,allAppCount,user.currentOrgId]);
140135

141136
if(fetchingUser||!isPreloadCompleted){
142137
return<ProductLoading/>;

‎client/packages/lowcoder/src/redux/sagas/folderSagas.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,19 @@ export function* fetchFolderElementsSaga(action: ReduxAction<FetchFolderElements
118118
type:ReduxActionTypes.FETCH_ALL_FOLDERS_SUCCESS,
119119
payload:response.data.data.filter((m)=>m.folder),
120120
});
121+
122+
// filter out applications with NORMAL status
123+
124+
constapplications=response.data.data.filter((item):item isApplicationMeta=>
125+
!item.folder&&item.applicationStatus==="NORMAL"
126+
);
127+
128+
yieldput({
129+
type:ReduxActionTypes.FETCH_ALL_APPLICATIONS_SUCCESS,
130+
payload:applications,
131+
});
121132
}
133+
122134
yieldput({
123135
type:ReduxActionTypes.FETCH_FOLDER_ELEMENTS_SUCCESS,
124136
payload:{parentFolderId:action.payload.folderId,elements:response.data.data},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp