Skip to content

Commit c8f9e3d

Browse files
committed
#1848 remove duplicate environments call
1 parent 5fb6c52 commit c8f9e3d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/packages/lowcoder/src/util/context/EnterpriseContext.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ export const EnterpriseProvider: React.FC<ProviderProps> = ({ children }) => {
2626
// Fetch the enterprise license only if we're in an EE environment
2727
dispatch(fetchEnterpriseLicense());
2828
dispatch(fetchEnvironments());
29-
dispatch(fetchBrandingSetting({ orgId: user.currentOrgId, fallbackToGlobal: true }))
3029
} else {
3130
// Set the state to false for non-EE environments
3231
// setEEActiveState(false);
3332
setIsEnterpriseActive(false);
3433
}
35-
}, [dispatch, user.currentOrgId]);
34+
}, [dispatch]);
3635

3736
useEffect(() => {
3837
if (isEEEnvironment()) {
@@ -41,6 +40,12 @@ export const EnterpriseProvider: React.FC<ProviderProps> = ({ children }) => {
4140
setIsEnterpriseActive(isEnterpriseActiveRedux);
4241
}
4342
}, [isEnterpriseActiveRedux]);
43+
44+
useEffect(() => {
45+
if (isEEEnvironment()) {
46+
dispatch(fetchBrandingSetting({ orgId: user.currentOrgId, fallbackToGlobal: true }))
47+
}
48+
}, [dispatch, user.currentOrgId]);
4449

4550
return (
4651
<EnterpriseContext.Provider value={{ isEnterpriseActive }}>

0 commit comments

Comments
 (0)