Skip to content

Commit f9f6a70

Browse files
avoid multiple home requests
1 parent b530982 commit f9f6a70

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

client/packages/lowcoder/src/components/layout/Layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ export function Layout(props: LayoutProps) {
111111
placement="right"
112112
closable={true}
113113
onClose={toggleDrawer}
114-
visible={drawerVisible}
115-
bodyStyle={{ padding: "0px" }}
114+
open={drawerVisible}
115+
styles={{
116+
body: { padding: "0px" }
117+
}}
116118
destroyOnClose // Ensure drawer content is removed when closed
117119
>
118120
<DrawerContentWrapper>

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,15 @@ export default function ApplicationHome() {
104104
if (user.currentOrgId) {
105105
dispatch(fetchDeploymentIdAction());
106106
}
107-
dispatch(fetchHomeData({}));
108107
}, [user.currentOrgId]);
109108

109+
useEffect(() => {
110+
// tricky check, will be called for anonymous user to redirect to login page
111+
if (user.isAnonymous) {
112+
dispatch(fetchHomeData({}));
113+
}
114+
}, [user.isAnonymous])
115+
110116
useEffect(() => {
111117
if(Boolean(deploymentId)) {
112118
dispatch(fetchSubscriptionsAction())

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