From 46a147723e30af5e36d706d9cfc4a9c788210204 Mon Sep 17 00:00:00 2001 From: Faran Javed Date: Fri, 20 Jun 2025 19:55:07 +0500 Subject: [PATCH] remove applications/list endpoint from home --- .../lowcoder/src/pages/ApplicationV2/index.tsx | 15 +++++---------- .../lowcoder/src/redux/sagas/folderSagas.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/client/packages/lowcoder/src/pages/ApplicationV2/index.tsx b/client/packages/lowcoder/src/pages/ApplicationV2/index.tsx index 4faaf6a3fb..5987d097d0 100644 --- a/client/packages/lowcoder/src/pages/ApplicationV2/index.tsx +++ b/client/packages/lowcoder/src/pages/ApplicationV2/index.tsx @@ -32,7 +32,7 @@ import { UserIcon, } from "lowcoder-design"; import React, { useCallback, useEffect, useState, useMemo } from "react"; -import { fetchAllApplications, fetchHomeData } from "redux/reduxActions/applicationActions"; +import { fetchHomeData } from "redux/reduxActions/applicationActions"; import { fetchSubscriptionsAction } from "redux/reduxActions/subscriptionActions"; import { getHomeOrg, normalAppListSelector } from "redux/selectors/applicationSelector"; import { DatasourceHome } from "../datasource"; @@ -125,18 +125,13 @@ export default function ApplicationHome() { }, [org, orgHomeId]); useEffect(() => { - if (allAppCount !== 0) { - return; - } - user.currentOrgId && dispatch(fetchAllApplications({})); - }, [dispatch, allAppCount, user.currentOrgId]); - - useEffect(() => { - if (allFoldersCount !== 0) { + // Check if we need to fetch data (either no folders or no applications) + if (allFoldersCount !== 0 && allAppCount !== 0) { return; } + user.currentOrgId && dispatch(fetchFolderElements({})); - }, [dispatch, allFoldersCount, user.currentOrgId]); + }, [dispatch, allFoldersCount, allAppCount, user.currentOrgId]); if (fetchingUser || !isPreloadCompleted) { return ; diff --git a/client/packages/lowcoder/src/redux/sagas/folderSagas.ts b/client/packages/lowcoder/src/redux/sagas/folderSagas.ts index 62b74659e8..9db0a1eee6 100644 --- a/client/packages/lowcoder/src/redux/sagas/folderSagas.ts +++ b/client/packages/lowcoder/src/redux/sagas/folderSagas.ts @@ -118,7 +118,19 @@ export function* fetchFolderElementsSaga(action: ReduxAction m.folder), }); + + // filter out applications with NORMAL status + + const applications = response.data.data.filter((item): item is ApplicationMeta => + !item.folder && item.applicationStatus === "NORMAL" + ); + + yield put({ + type: ReduxActionTypes.FETCH_ALL_APPLICATIONS_SUCCESS, + payload: applications, + }); } + yield put({ type: ReduxActionTypes.FETCH_FOLDER_ELEMENTS_SUCCESS, payload: { parentFolderId: action.payload.folderId, elements: response.data.data }, 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